ComboBoxComponent Class Reference

コンボボックス表示のコンポーネント More...

#include <comboBoxComponent.h>

Inheritance diagram for ComboBoxComponent:

Inheritance graph
[legend]
Collaboration diagram for ComboBoxComponent:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ComboBoxComponent (TTF_Draw &ttf_resource)
 TrueTypeFontリソース指定のコンストラクタ.
bool draw (unsigned long ticks, const UserInput &ui)
 コンポーネントの描画
void add (const Uint16 *text)
 表示項目の追加
void add (const char *text)
void setColor (unsigned long fore, unsigned long back, unsigned long focused_fore, unsigned long focused_back)
void setFontSize (int size)
 フォントサイズ変更
void updateSelected (void)
 選択情報のクリア
void activate (bool on)
 描画
void setNowIndex (int index)
 選択項目の強制指定
bool isDecided (void)
unsigned int getNowIndex (void)
 選択項目の取得
void beginFocus (void)
void endFocus (void)


Detailed Description

コンボボックス表示のコンポーネント

Definition at line 23 of file comboBoxComponent.h.


Constructor & Destructor Documentation

ComboBoxComponent::ComboBoxComponent ( TTF_Draw ttf_resource  ) 

TrueTypeFontリソース指定のコンストラクタ.

Parameters:
ttf_resource [i] TrueTypeFontリソース

Definition at line 11 of file comboBoxComponent.cpp.

References ComponentInterface::h, ComponentInterface::position, and ComponentInterface::w.


Member Function Documentation

bool ComboBoxComponent::draw ( unsigned long  ticks,
const UserInput ui 
) [virtual]

コンポーネントの描画

コンポーネントを描画する

Parameters:
ticks [i] 時刻印 [msec]を渡す。ただし、これ以外の情報を渡してもよい
ui [i] ウィンドウへのユーザ入力情報
Return values:
true 正常
false 以後の描画は必要ない

Implements ComponentInterface.

Definition at line 66 of file comboBoxComponent.cpp.

References MenuComponent::activate(), MenuComponent::draw(), LabelComponent::draw(), ButtonComponent::draw(), MenuComponent::getNowIndex(), ComponentInterface::h, MenuComponent::hide(), MenuComponent::isDecided(), ButtonComponent::isPressed(), ComponentInterface::position, setNowIndex(), ComponentInterface::setPosition(), and UserInput::state.

void ComboBoxComponent::add ( const Uint16 *  text  ) 

表示項目の追加

Parameters:
text [i] 表示文字列

Definition at line 111 of file comboBoxComponent.cpp.

Referenced by PracticeMenu::Initialize(), and FirstMenu::Initialize().

void ComboBoxComponent::setFontSize ( int  size  ) 

フォントサイズ変更

Parameters:
size [i] フォントサイズ

Definition at line 137 of file comboBoxComponent.cpp.

Referenced by PracticeMenu::Initialize(), and FirstMenu::Initialize().

void ComboBoxComponent::activate ( bool  on  ) 

void ComboBoxComponent::setNowIndex ( int  index  ) 

選択項目の強制指定

Parameters:
index [i] 選択項目番号

Definition at line 233 of file comboBoxComponent.cpp.

References MenuComponent::setNowIndex(), and updateSelected().

Referenced by draw(), and FirstMenu::Initialize().

unsigned int ComboBoxComponent::getNowIndex ( void   ) 

選択項目の取得

Returns:
選択項目番号

Definition at line 247 of file comboBoxComponent.cpp.

Referenced by PracticeMenu::MainLoop(), and FirstMenu::MainLoop().


The documentation for this class was generated from the following files:

Generated on Mon Apr 13 22:52:07 2009 by  doxygen 1.5.7.1