このモジュール open.gui.GraphicsLabelWindow は、GUI部品として、グラフィックスラベルを表示するウィンドウ ―― グラフィックスラベルウィンドウ ―― を提供します。
即席の描画ウィンドウや、画像ファイル表示ウィンドウなどとして使用できます。
VCSSLの標準ライブラリ「 GUI 」では、GUI部品をint型のIDで扱いますが、このモジュールで提供されるGUI部品は、GraphicsLabelWindow 構造体として扱います。
GraphicsLabelWindow 構造体は、内部にリソースのID等を保持していますが、
生成・破棄のための関数が提供されるため、その中身を特に意識する必要はありません( むしろメンバへの直接的なアクセスは推奨されません )。
具体的には、 newGraphicsLabelWindow 関数で生成し、 deleteComponent 関数で破棄します。
またこのモジュールでは、GraphicsLabelWindow 構造体を標準ライブラリ「 GUI 」と同様の感覚でそのまま扱えるように、標準GUIライブラリ関数のオーバーロードも提供されます。
例えば、 mountComponent 関数や、setComponentSize 関数、 setComponentLocation 関数などが提供されます。
宣言 - Declaration |
struct GraphicsLabelWindow |
詳細 - Description |
グラフィックラベルウィンドウの構造体です。 |
宣言 - Declaration |
GraphicsLabelWindow newGraphicsLabelWindow(int x, int y, int width, int height, string title, int graphics) |
詳細 - Description |
グラフィックスラベルウィンドウを生成します。 |
引数 - Arguments |
x : ウィンドウ左上頂点のX座標 y : ウィンドウ左上頂点のY座標 width : ウィンドウの幅 height : ウィンドウの高さ title : ウィンドウのタイトル graphics : グラフィックスリソース |
戻り値 - Return |
生成したウィンドウ構造体 |
宣言 - Declaration |
GraphicsLabelWindow newGraphicsLabelWindow(int graphics) |
詳細 - Description |
自動でウィンドウサイズを決定し、グラフィックスラベルウィンドウを生成します。 |
引数 - Arguments |
graphics : グラフィックスリソース |
戻り値 - Return |
生成したウィンドウ構造体 |
宣言 - Declaration |
void deleteComponent(GraphicsLabelWindow &windowInstance) |
詳細 - Description |
グラフィックスラベルウィンドウを破棄します。 |
引数 - Arguments |
windowInstance : 破棄するウィンドウ |
宣言 - Declaration |
int getWindow(GraphicsLabelWindow &windowInstance) |
詳細 - Description |
ウィンドウのGUIコンポーネントIDを返します。 |
引数 - Arguments |
windowInstance : 取得対象のウィンドウ |
戻り値 - Return |
ウィンドウのGUIコンポーネントID |
宣言 - Declaration |
int getGraphicsLabel(GraphicsLabelWindow &windowInstance) |
詳細 - Description |
グラフィックスラベルのGUIコンポーネントIDを返します。 |
引数 - Arguments |
windowInstance : 取得対象のウィンドウ |
戻り値 - Return |
グラフィックスラベルのGUIコンポーネントID |
宣言 - Declaration |
void setComponentSize(GraphicsLabelWindow &windowInstance, int width, int height) |
詳細 - Description |
ウィンドウサイズを設定します。 |
引数 - Arguments |
windowInstance : 設定対象のウィンドウ width : ウィンドウの幅 height : ウィンドウの高さ |
宣言 - Declaration |
void setComponentSize(GraphicsLabelWindow &windowInstance) |
詳細 - Description |
ウィンドウの現在のサイズに合わせて、内部コンポーネントのレイアウトを自動設定します。ウインドウのサイズを外部から変更した際に使用します。 |
引数 - Arguments |
windowStruct : 対象のウィンドウ |
宣言 - Declaration |
int[] getComponentSize(GraphicsLabelWindow &windowStruct) |
詳細 - Description |
ウィンドウのサイズを返します。 |
引数 - Arguments |
windowStruct : 対象のウィンドウ |
戻り値 - Return |
ウィンドウのサイズを格納する配列 |
宣言 - Declaration |
void fitComponentSize(GraphicsLabelWindow &windowInstance) |
詳細 - Description |
グラフィックスリソースにちょうど適切なウィンドウサイズを設定します。 |
引数 - Arguments |
windowInstance : 設定対象のウィンドウ |
宣言 - Declaration |
void setComponentLocation(GraphicsLabelWindow &windowInstance, int x, int y) |
詳細 - Description |
ウィンドウの位置を設定します。 |
引数 - Arguments |
windowInstance : 設定対象のウィンドウ x : ウィンドウ左上頂点のX座標 y : ウィンドウ左上頂点のY座標 |
宣言 - Declaration |
int[] getComponentLocation(GraphicsLabelWindow &windowStruct) |
詳細 - Description |
ウィンドウの位置を返します。 |
引数 - Arguments |
windowStruct : 対象のウィンドウ |
戻り値 - Return |
ウィンドウの位置を格納する配列 |
宣言 - Declaration |
void paintComponent(GraphicsLabelWindow &windowStruct) |
詳細 - Description |
ウィンドウを再描画します。 |
引数 - Arguments |
windowStruct : 対象のウィンドウ |
宣言 - Declaration |
void hideComponent(GraphicsLabelWindow &windowStruct) |
詳細 - Description |
ウィンドウを不可視化します。 |
引数 - Arguments |
windowStruct : 対象のウィンドウ |
宣言 - Declaration |
void showComponent(GraphicsLabelWindow &windowStruct) |
詳細 - Description |
ウィンドウを可視化します。 |
引数 - Arguments |
windowStruct : 対象のウィンドウ |