diff options
author | Berk Geveci <berk.geveci@kitware.com> | 2001-12-13 18:28:41 (GMT) |
---|---|---|
committer | Berk Geveci <berk.geveci@kitware.com> | 2001-12-13 18:28:41 (GMT) |
commit | 69cb66f7ffd5541f60026135fa521f0369210bab (patch) | |
tree | adf376c3f9ab2b35360e1845d31c85d7d0636354 /Source/CursesDialog/cmCursesWidget.h | |
parent | 10085174b630460f69697da0017f7c41c7ae2908 (diff) | |
download | CMake-69cb66f7ffd5541f60026135fa521f0369210bab.zip CMake-69cb66f7ffd5541f60026135fa521f0369210bab.tar.gz CMake-69cb66f7ffd5541f60026135fa521f0369210bab.tar.bz2 |
Updated toolbar.
Diffstat (limited to 'Source/CursesDialog/cmCursesWidget.h')
-rw-r--r-- | Source/CursesDialog/cmCursesWidget.h | 58 |
1 files changed, 44 insertions, 14 deletions
diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h index a516bca..f4822a5 100644 --- a/Source/CursesDialog/cmCursesWidget.h +++ b/Source/CursesDialog/cmCursesWidget.h @@ -4,34 +4,62 @@ #include "../cmCacheManager.h" #include "cmCursesStandardIncludes.h" +class cmCursesMainForm; + class cmCursesWidget { public: cmCursesWidget(int width, int height, int left, int top); virtual ~cmCursesWidget(); - // Description: - // Handle user input. Called by the container of this widget - // when this widget has focus. Returns true if the input was - // handled - virtual bool HandleInput(int& key, FORM* form, WINDOW* w) = 0; - - // Description: - // Change the position of the widget. Set isNewPage to true - // if this widget marks the beginning of a new page. + /** + * Handle user input. Called by the container of this widget + * when this widget has focus. Returns true if the input was + * handled + */ + virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) = 0; + + /** + * Change the position of the widget. Set isNewPage to true + * if this widget marks the beginning of a new page. + */ virtual void Move(int x, int y, bool isNewPage); - // Description: - // Set/Get the value (setting the value also changes the contents - // of the field buffer). + /** + * Set/Get the value (setting the value also changes the contents + * of the field buffer). + */ virtual void SetValue(const char* value); virtual const char* GetValue(); - // Description: - // Get the type of the widget (STRING, PATH etc...) + /** + * Get the type of the widget (STRING, PATH etc...) + */ cmCacheManager::CacheEntryType GetType() { return m_Type; } + /** + * If there are any, print the widget specific commands + * in the toolbar and return true. Otherwise, return false + * and the parent widget will print. + */ + virtual bool PrintKeys() + { + return false; + } + + /** + * Set/Get the page this widget is in. + */ + void SetPage(int page) + { + m_Page = page; + } + int GetPage() + { + return m_Page; + } + friend class cmCursesMainForm; protected: @@ -41,6 +69,8 @@ protected: cmCacheManager::CacheEntryType m_Type; std::string m_Value; FIELD* m_Field; + // The page in the main form this widget is in + int m_Page; }; #endif // __cmCursesWidget_h |