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