このライブラリ gui.HorizontalSliderWindow は、GUI部品として、水平スライダーが並ぶウィンドウ ―― スライダーウィンドウ ―― を提供します。
VCSSLの標準ライブラリ「 GUI 」では、GUI部品をint型のIDで扱いますが、このモジュールで提供されるGUI部品は、HorizontalSliderWindow 構造体として扱います。
HorizontalSliderWindow 構造体は、内部にリソースのID等を保持していますが、
生成・破棄のための関数が提供されるため、その中身を特に意識する必要はありません( むしろメンバへの直接的なアクセスは推奨されません )。
具体的には、 newHorizontalSliderWindow 関数で生成し、 deleteComponent 関数で破棄します。
またこのモジュールでは、HorizontalSliderWindow 構造体を標準ライブラリ「 GUI 」と同様の感覚でそのまま扱えるように、標準GUIライブラリ関数のオーバーロードも提供されます。
例えば、 mountComponent 関数や、setComponentSize 関数、 setComponentLocation 関数などが提供されます。
定義 - Signature |
struct HorizontalSliderWindow |
詳細 - Details |
スライダーウィンドウの構造体です。 |
- なし - None -
定義 - Signature |
HorizontalSliderWindow newHorizontalSliderWindow(int x, int y, int width, int height, string title, string labelText[ ], float defaultValue[ ], float minValue[ ], float maxValue[ ]) |
詳細 - Details |
スライダーウィンドウを生成します。 |
引数 - Arguments |
x : ウィンドウ左上頂点のX座標 y : ウィンドウ左上頂点のY座標 width : ウィンドウの幅 height : ウィンドウの高さ title : ウィンドウのタイトル labelText : 全スライダーのラベル文字列を格納する配列 defaultValue : 全スライダーのデフォルト値を格納する配列 minValue : 全スライダーの最小値を格納する配列 maxValue : 全スライダーの最大値を格納する配列 |
戻り値 - Return |
生成したテキストフィールドウィンドウ |
定義 - Signature |
HorizontalSliderWindow newHorizontalSliderWindow(string labelText[ ], float defaultValue[ ], float minValue[ ], float maxValue[ ]) |
詳細 - Details |
自動でウィンドウサイズを決定し、スライダーウィンドウを生成します。 |
引数 - Arguments |
labelText : 全スライダーのラベル文字列を格納する配列 defaultValue : 全スライダーのデフォルト値を格納する配列 minValue : 全スライダーの最小値を格納する配列 maxValue : 全スライダーの最大値を格納する配列 |
戻り値 - Return |
生成したテキストフィールドウィンドウ |
定義 - Signature |
HorizontalSliderWindow newHorizontalSliderWindow(int x, int y, int width, int height, string title, string labelText[ ], int defaultValue[ ], int minValue[ ], int maxValue[ ]) |
詳細 - Details |
スライダーウィンドウを生成します。 |
引数 - Arguments |
x : ウィンドウ左上頂点のX座標 y : ウィンドウ左上頂点のY座標 width : ウィンドウの幅 height : ウィンドウの高さ title : ウィンドウのタイトル labelText : 全スライダーのラベル文字列を格納する配列 defaultValue : 全スライダーのデフォルト値を格納する配列 minValue : 全スライダーの最小値を格納する配列 maxValue : 全スライダーの最大値を格納する配列 |
戻り値 - Return |
生成したテキストフィールドウィンドウ |
定義 - Signature |
HorizontalSliderWindow newHorizontalSliderWindow(string labelText[ ], int defaultValue[ ], int minValue[ ], int maxValue[ ]) |
詳細 - Details |
自動でウィンドウサイズを決定し、スライダーウィンドウを生成します。 |
引数 - Arguments |
labelText : 全スライダーのラベル文字列を格納する配列 defaultValue : 全スライダーのデフォルト値を格納する配列 minValue : 全スライダーの最小値を格納する配列 maxValue : 全スライダーの最大値を格納する配列 |
戻り値 - Return |
生成したテキストフィールドウィンドウ |
定義 - Signature |
void deleteComponent(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
スライダーウィンドウを破棄します。 |
引数 - Arguments |
windowInstance : 破棄するウィンドウ |
定義 - Signature |
void setTextLabelWidth(HorizontalSliderWindow &windowInstance, int labelWidth) |
詳細 - Details |
ラベル部分の幅を設定します。 |
引数 - Arguments |
windowInstance : 取得対象のスライダーウィンドウ labelWidth : ラベル幅 |
定義 - Signature |
void setButton(HorizontalSliderWindow &windowInstance, string label) |
詳細 - Details |
ウィンドウ下部に、決定ボタンを出現させます。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ 決定ボタンのラベル文字列 : |
定義 - Signature |
int getButton(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
決定ボタンのGUIコンポーネントIDを取得します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ |
戻り値 - Return |
決定ボタンのGUIコンポーネントID |
定義 - Signature |
int getWindow(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
ウィンドウのGUIコンポーネントIDを取得します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ |
戻り値 - Return |
ウィンドウのGUIコンポーネントID |
定義 - Signature |
int getHorizontalSlider(HorizontalSliderWindow &windowInstance, string labelText) |
詳細 - Details |
指定されたラベルに対応するスライダーを取得します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ labelText : 取得対象のスライダーに対応するラベル文字列 |
戻り値 - Return |
スライダーのGUIコンポーネントID |
定義 - Signature |
int getHorizontalSlider(HorizontalSliderWindow &windowInstance, int index) |
詳細 - Details |
指定されたインデックスのスライダーを取得します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ index : スライダーのインデックス |
戻り値 - Return |
スライダーのGUIコンポーネントID |
定義 - Signature |
int[ ] getComponentSize(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
ウィンドウのサイズを返します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ |
戻り値 - Return |
ウィンドウのサイズを格納する配列 |
定義 - Signature |
void setComponentSize(HorizontalSliderWindow &windowInstance, int width, int height) |
詳細 - Details |
ウィンドウのサイズを設定します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ width : 幅 width : 高さ |
戻り値 - Return |
ウィンドウのサイズを格納する配列 |
定義 - Signature |
void setComponentSize(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
ウィンドウの現在のサイズに合わせて、内部コンポーネントのサイズを自動設定します。ウィンドウのサイズを外部から変更した際に使用します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ |
定義 - Signature |
int[ ] getComponentLocation(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
ウィンドウの位置を返します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ |
戻り値 - Return |
ウィンドウの位置を格納する配列 |
定義 - Signature |
void setComponentLocation(HorizontalSliderWindow &windowInstance, int x, int y) |
詳細 - Details |
ウィンドウの位置を設定します。 |
引数 - Arguments |
windowInstance : 設定対象のウィンドウ x : ウィンドウ左上頂点のX座標 y : ウィンドウ左上頂点のY座標 |
定義 - Signature |
void setComponentLocation(HorizontalSliderWindow &windowInstance, int x, int y) |
詳細 - Details |
ウィンドウの位置を設定します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ x : ウィンドウのX座標 y : ウィンドウのY座標 |
定義 - Signature |
void paintComponent(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
ウィンドウを再描画します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ |
定義 - Signature |
void hideComponent(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
ウィンドウを不可視化します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ |
定義 - Signature |
void showComponent(HorizontalSliderWindow &windowInstance) |
詳細 - Details |
ウィンドウを可視化します。 |
引数 - Arguments |
windowInstance : 対象のウィンドウ |