//--------------------------------------------------------------------------- // // 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. // // This software is the confidential and proprietary information of // Geoworks ("Confidential Information"). You shall not disclose // such Confidential Information and shall use it only in accordance // with the terms of the license agreement you entered into with // Geoworks. // // PROJECT: GEOS_SC Documentation // MODULE: Flex UI Chapter // FILE: notepad.h // // VERSION 2.0 // // DESCRIPTION: // // An notepad application that uses three buttons to save and // revert text in a text buffer. // //------------------------------------------------------------------------- #ifndef _NOTEPAD_H_ #define _NOTEPAD_H_ #include // For the AppBase class. class NotepadApp : public ActionListenerInterface, public AppBase { public: // // Constructor - initializes member data // NotepadApp(); // // Override SetAppContext to create the user interface for // the application. // virtual void SetAppContext(const TCHAR *context); // // Override ActionPerformed to intercept button presses // virtual void ActionPerformed(ActionEvent& event); // // Override Exit to destroy the user interface for // the application. // virtual void Exit(void); private: // // Helper function to create the UI for opening screen. // Result AttachNotepadAppUI(void); // // Helper function to create buttons for the frame. // Result CreateButton(const TCHAR *title, FlexComponentID buttonID); // // Class variables. // FlexFrame *_notepadAppMainFrame; FlexHorizontalPanel *_notepadAppButtonPanel; FlexTextArea *_notepadAppTextDisplay; Boolean _notepadAppUIBuilt; enum { NOTEPADAPP_CLEAR_BUTTON = 0, NOTEPADAPP_SAVE_BUTTON = 1, NOTEPADAPP_REVERT_BUTTON = 2, NOTEPADAPP_FRAME_GAP = 10, NOTEPADAPP_BUTTON_PANEL_GAP = 8 }; }; #endif /* _NOTEPAD_H_ */