CheckBoxPanel ライブラリ

- 目次 -


概要

このライブラリ gui.CheckBoxPanel は、GUI部品として、チェックボックスが並ぶパネル ―― チェックボックスパネル ―― を提供します。

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

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

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


目次

struct CheckBoxPanel
チェックボックスパネルの構造体です。
CheckBoxPanel newCheckBoxPanel(int x, int y, int width, int height, string labelText[ ], bool defaultValue[ ])
チェックボックスパネルを生成します。
void deleteComponent(CheckBoxPanel &panelInstance)
チェックボックスパネルを破棄します。
void paintComponent(CheckBoxPanel &panelInstance)
チェックボックスパネルを再描画します。
void mountComponent(CheckBoxPanel &panelInstance, int componentID)
チェックボックスパネルを、別のGUIコンポーネント上に配置します。
void demountComponent(CheckBoxPanel &panelInstance, int componentID)
チェックボックスパネルを、別のGUIコンポーネントから配置解除します。
int getPanel(CheckBoxPanel &panelInstance)
パネルのコンポーネントIDを返します。
int getCheckBox(CheckBoxPanel &panelInstance, string labelText)
指定されたラベルに対応するチェックボックスを取得します。
int getCheckBox(CheckBoxPanel &panelInstance, int index)
指定されたインデックスのチェックボックスを取得します。
int[ ] getComponentSize(CheckBoxPanel &panelInstance)
パネルのサイズを返します。
void setComponentSize(CheckBoxPanel &panelInstance, int width, int height)
パネルのサイズを設定します。
void setComponentSize(CheckBoxPanel &panelInstance)
パネルの現在のサイズに合わせて、内部コンポーネントのサイズを自動設定します。パネルのサイズを外部から変更した際に使用します。
int[ ] getComponentLocation(CheckBoxPanel &panelInstance)
パネルの位置を返します。
void setComponentLocation(CheckBoxPanel &panelInstance, int x, int y)
パネルの位置を設定します。

構造体

構造体名 CheckBoxPanel
宣言形式 struct CheckBoxPanel
説明 チェックボックスパネルの構造体です。

変数

- なし -


関数

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