//--------------------------------------------------------------------------- // // Geoworks (R) application software and GEOS (R) operating system // software copyright (C) 1990-1998 Geoworks. All rights reserved. // United States Patents 5327529, 5237651, and 5438662. U.K. Patents // 0375703 and 0631677. German Patents P3854269.2-08 and // 69307728.1-08. French Patents 0375703 and 0631677. Other // international patents pending. // // このソフトウェアは、Geoworks の専有する秘密情報 // ("企業秘密") です。この企業秘密を公開してはならず、 // Geoworks と締結したライセンス契約書の条件に // 従ってのみ使用することができます。 // // // // プロジェクト : GEOS-SC マニュアル // モジュール : チュートリアル // ファイル : tutsamp.h // // バージョン : 2.2 // // 解説 : // 単純な "Hello World" アプリケーションです。 // //--------------------------------------------------------------------------- // // このファイルが重複してインクルードされることを防止します // #ifndef _TUTSAMPAPP_H_ #define _TUTSAMPAPP_H_ #include //UI オブジェクト (FlexFrame など) を使用します #include //AppBase クラスを使用します #include //ActionListenerInterface クラスを使用します #include //ResidentApplication クラスを使用します class TutorialApp : public ActionListenerInterface, public AppBase { public: TutorialApp(void); // UI を構築するために、SetAppContext をオーバーライドします virtual void SetAppContext(const TCHAR *context); // アプリケーションの状態を保存するために、GetAppContext をオーバーライドします virtual TCHAR *GetAppContext(void); // ボタンの押下に対応するために、ActionPerformed をオーバーライドします virtual void ActionPerformed(ActionEvent& event); // アプリケーション終了時のクリーンアップを行うために、Exit をオーバーライドします virtual void Exit(void); private: // UI を作成するヘルパー関数です Result BuildUI(void); // UI が既に構築されているかどうかを示すフラグです Boolean _builtUI; // このラベルは "Hello World!" を表示します。 // コードからラベルの表示と非表示を切り替えるときに便利なように、 // ポインタを宣言します FlexLabel *_helloworldLabel; // アプリケーションの UI を終了するとき // 削除するのに便利なように、 // ポインタを宣言します VerticalFlowLayout *_layout; }; // // ユーザーに表示されない文字列です // const TCHAR *const TUTSAMP_APP_NAME = _TEXT("tutsamp"); // システムにアプリケーションを登録する ResidentApplication のサブクラスです class TutorialSampResidentApplication : public ResidentApplication { public: TutorialSampResidentApplication() : ResidentApplication(TUTSAMP_APP_NAME) {}; virtual AppBase *CreateAppBase(void) { return new TutorialApp; } }; static TutorialSampResidentApplication tutsampApp; #endif // _TUTSAMPAPP_H_