CheckBoxPanel


概要 - Abstract

このモジュール open.gui.CheckBoxPanel は、GUI部品として、チェックボックスが並ぶパネル ―― チェックボックスパネル ―― を提供します。

VCSSLの標準ライブラリ「 GUI 」では、GUI部品をint型のIDで扱いますが、このモジュールで提供されるGUI部品は、CheckBoxPanel 構造体として扱います。

CheckBoxPanel 構造体は、内部にリソースのID等を保持していますが、
生成・破棄のための関数が提供されるため、その中身を特に意識する必要はありません( むしろメンバへの直接的なアクセスは推奨されません )。
具体的には、 newCheckBoxPanel 関数で生成し、 deleteComponent 関数で破棄します。

またこのモジュールでは、CheckBoxPanel 構造体を標準ライブラリ「 GUI 」とほぼ同様の感覚でそのまま扱えるように、標準GUIライブラリ関数のオーバーロードも提供されます。
例えば、 mountComponent 関数や、setComponentSize 関数、 setComponentLocation 関数などが提供されます。


構造体 - Structs

宣言
- Declaration
struct CheckBoxPanel
詳細
- Description
チェックボックスパネルの構造体です。

変数 - Variables


関数 - Functions

宣言
- Declaration
CheckBoxPanel newCheckBoxPanel(int x, int y, int width, int height, string labelText[], bool defaultValue[])
詳細
- Description
チェックボックスパネルを生成します。
引数
- Arguments
x : パネルのX座標
y : パネルのY座標
width : パネルの幅
height : パネルの高さ
labelText : ラベル文字列を格納する配列
defaultText : チェックボックスの初期値文字列を格納する配列
戻り値
- Return
生成したチェックボックスパネル構造体
宣言
- Declaration
void deleteComponent(CheckBoxPanel &panelInstance)
詳細
- Description
チェックボックスパネルを破棄します。
引数
- Arguments
panelInstance : 破棄するチェックボックスパネル
宣言
- Declaration
void paintComponent(CheckBoxPanel &panelInstance)
詳細
- Description
チェックボックスパネルを再描画します。
引数
- Arguments
panelInstance : 再描画するチェックボックスパネル
宣言
- Declaration
void mountComponent(CheckBoxPanel &panelInstance, int componentID)
詳細
- Description
チェックボックスパネルを、別のGUIコンポーネント上に配置します。
引数
- Arguments
panelInstance : 配置するチェックボックスパネル
componentID : 配置先GUIコンポーネントID
宣言
- Declaration
void demountComponent(CheckBoxPanel &panelInstance, int componentID)
詳細
- Description
チェックボックスパネルを、別のGUIコンポーネントから配置解除します。
引数
- Arguments
panelInstance : 配置解除するチェックボックスパネル
componentID : 配置先GUIコンポーネントID
宣言
- Declaration
int getPanel(CheckBoxPanel &panelInstance)
詳細
- Description
パネルのコンポーネントIDを返します。
引数
- Arguments
panelInstance : 取得対象のチェックボックスパネル
戻り値
- Return
パネルのGUIコンポーネントID
宣言
- Declaration
int getCheckBox(CheckBoxPanel &panelInstance, string labelText)
詳細
- Description
指定されたラベルに対応するチェックボックスを取得します。
引数
- Arguments
panelInstance : 対象のチェックボックスパネル
labelText : 取得対象のチェックボックスに対応するラベル文字列
戻り値
- Return
チェックボックスのGUIコンポーネントID
宣言
- Declaration
int getCheckBox(CheckBoxPanel &panelInstance, int index)
詳細
- Description
指定されたインデックスのチェックボックスを取得します。
引数
- Arguments
panelInstance : 対象のチェックボックスパネル
index : チェックボックスのインデックス
戻り値
- Return
チェックボックスのGUIコンポーネントID
宣言
- Declaration
int[] getComponentSize(CheckBoxPanel &panelInstance)
詳細
- Description
パネルのサイズを返します。
引数
- Arguments
panelInstance : 対象のチェックボックスパネル
戻り値
- Return
パネルのサイズを格納する配列
宣言
- Declaration
void setComponentSize(CheckBoxPanel &panelInstance, int width, int height)
詳細
- Description
パネルのサイズを設定します。
引数
- Arguments
panelInstance : 対象のチェックボックスパネル
width : パネルの幅
height : パネルの高さ
宣言
- Declaration
void setComponentSize(CheckBoxPanel &panelInstance)
詳細
- Description
パネルの現在のサイズに合わせて、内部コンポーネントのサイズを自動設定します。パネルのサイズを外部から変更した際に使用します。
引数
- Arguments
panelInstance : 対象のチェックボックスパネル
宣言
- Declaration
int[] getComponentLocation(CheckBoxPanel &panelInstance)
詳細
- Description
パネルの位置を返します。
引数
- Arguments
panelInstance : 対象のチェックボックスパネル
戻り値
- Return
パネルの位置を格納する配列
宣言
- Declaration
void setComponentLocation(CheckBoxPanel &panelInstance, int x, int y)
詳細
- Description
パネルの位置を設定します。
引数
- Arguments
panelInstance : 対象のチェックボックスパネル
x : ウィンドウのX座標
y : ウィンドウのY座標