1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     SmLytSliderBar.h
4 
5   Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Revision: 1 $
14  *---------------------------------------------------------------------------*/
15 #ifndef SM_LYT_SLIDERBAR_H_
16 #define SM_LYT_SLIDERBAR_H_
17 
18 #include "../include/SmLayout.h"
19 #include "../include/SmMessage.h"
20 #include "../include/SmRectCollision.h"
21 
22 //------------------------------------------------------------------------------
23 // ���C�A�E�g�X���C�_�[�o�[��\������N���X
24 class SmLytSliderBar : public SmMessage
25 {
26 public:
27     // �R���X�g���N�^
28     SmLytSliderBar( f32 x,
29                     f32 y,
30                     SmLayout* smLayout);
31 
32     // �f�X�g���N�^
33     ~SmLytSliderBar();
34 
35     // ���b�Z�[�W��M
36     virtual bool ReceveMessage( SmMessageType type, void* object, uint targetId );
37 
38 
39     // �\��/��\���؂�ւ�
SetVisible(bool visible)40     virtual void SetVisible( bool visible )
41     {
42         // ���C�A�E�g�̕\��/��\����؂�ւ�
43         m_Layout->SetVisible( visible );
44     }
45 
46     // �`��
47     virtual void Render();
48 
49     // �p�����[�^�l���Z�b�g���܂��B
50     void SetParam( f32 param );
51 
52     // �p�����[�^�l���擾���܂��B
GetParam()53     f32 GetParam() const { return m_Param; }
54 
55 private:
56     SmLayout*           m_Layout;
57     nw::lyt::Pane*      m_HandlePane;
58     SmRectCollision     m_Collision;
59     f32                 m_Param;
60     bool                m_IsGrab;
61     s32                 m_RangeMinY;
62     s32                 m_RangeMaxY;
63     f32                 m_BaseY;
64 };
65 
66 
67 #endif  // SM_LYT_SLIDERBAR_H_
68