// ============================================= // GUIコンポーネントの配置 ここから // ============================================= // ( x, y ) = ( 300, 20 ) の位置に幅360×高さ480のウィンドウを生成 int windowID = newWindow( 300, 20, 360, 480, "Hello GUI" ) ; // ( 10, 10 ) の位置に100×50のボタンを配置 int buttonID = newButton ( 10, 10, 100, 50, "PUSH" ) ; mountComponent( buttonID, windowID ) ; // ( 10, 70 ) の位置に100×50サイズのテキストフィールドを配置 int textFieldD = newTextField( 10, 70, 100, 30, "INPUT" ) ; mountComponent( textFieldD, windowID ) ; // ( 120, 10 ) の位置に200×200サイズのテキストエリアを配置 int textAreaID = newTextArea( 120, 10, 200, 200, "INPUT" ) ; mountComponent( textAreaID, windowID ) ; // ( 10, 110 ) の位置に100×20サイズのセレクトフィールドを配置 string text[ 3 ] ; text[ 0 ] = "TYPE-A"; text[ 1 ] = "TYPE-B"; text[ 2 ] = "TYPE-C"; int selectFieldID = newSelectField( 10, 110, 100, 20, text ) ; mountComponent( selectFieldID, windowID ) ; // ( 10, 140 ) の位置に100×20サイズのチェックボックスを作成 int checkBoxID = newCheckBox( 10, 140, 100, 20, "TURBO", true ) ; mountComponent( checkBoxID, windowID ) ; // ( 10, 170 ) の位置に100×20サイズのテキストラベルを配置 int textLabelID = newTextLabel( 10, 170, 100, 20, "Hello GUI ! " ) ; mountComponent( textLabelID, windowID ) ; // 「Test.png」という名前のPNG形式画像ファイルを読み込み int graphicsID = newGraphics( "Test.png" ) ; // ( 10, 220 )の位置に310×200サイズの画像ラベルを配置 int imageLabelID = newImageLabel( 10, 220, 310, 200, graphicsID ) ; mountComponent( imageLabelID, windowID ) ; // ============================================= // GUIコンポーネントの配置 ここまで // =============================================