NIREP
|
00001 00002 // Name: GetPanelFromUser.h 00003 // Purpose: Display a window from a user selecting the menu option from 00004 // NIREPDisplay, that allows a user to select a panel that will 00005 // bring up the window to modify the panel. 00006 // Author: Jeffrey Hawley 00007 // Modified by: 00008 // Created: 07/01/2010 12:14:52 00009 // RCS-ID: 00010 // Copyright: 00011 // Licence: 00013 00014 #ifndef _GETPANELFROMUSER_H_ 00015 #define _GETPANELFROMUSER_H_ 00016 00017 00022 00023 #include "wx/frame.h" 00025 00030 00031 00032 00033 class NIREPDisplay; 00034 00039 00040 #define ID_GETPANELFROMUSER 10007 00041 #define ID_PANEL1 10008 00042 #define ID_ROW_TEXT 10009 00043 #define ID_COLUMN_TEXT 10010 00044 #define ID_OK_BUTTON 10011 00045 #define ID_CANCEL_BUTTON 10012 00046 #define SYMBOL_GETPANELFROMUSER_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX 00047 #define SYMBOL_GETPANELFROMUSER_TITLE _("Panel Selector") 00048 #define SYMBOL_GETPANELFROMUSER_IDNAME ID_GETPANELFROMUSER 00049 #define SYMBOL_GETPANELFROMUSER_SIZE wxSize(400, 200) 00050 #define SYMBOL_GETPANELFROMUSER_POSITION wxDefaultPosition 00051 00052 00053 00058 class GetPanelFromUser: public wxFrame 00059 { 00060 DECLARE_CLASS( GetPanelFromUser ) 00061 DECLARE_EVENT_TABLE() 00062 00063 public: 00065 GetPanelFromUser(); 00066 GetPanelFromUser( wxWindow* parent,int NumberOfRows, int NumberOfCols, wxWindowID id = SYMBOL_GETPANELFROMUSER_IDNAME, const wxString& caption = SYMBOL_GETPANELFROMUSER_TITLE, const wxPoint& pos = SYMBOL_GETPANELFROMUSER_POSITION, const wxSize& size = SYMBOL_GETPANELFROMUSER_SIZE, long style = SYMBOL_GETPANELFROMUSER_STYLE ); 00067 00068 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_GETPANELFROMUSER_IDNAME, const wxString& caption = SYMBOL_GETPANELFROMUSER_TITLE, const wxPoint& pos = SYMBOL_GETPANELFROMUSER_POSITION, const wxSize& size = SYMBOL_GETPANELFROMUSER_SIZE, long style = SYMBOL_GETPANELFROMUSER_STYLE ); 00069 00071 ~GetPanelFromUser(); 00072 00074 void Init(); 00075 00077 void CreateControls(); 00078 00080 00082 void OnOkButtonClick( wxCommandEvent& event ); 00083 00085 void OnCancelButtonClick( wxCommandEvent& event ); 00086 00088 00090 00092 wxBitmap GetBitmapResource( const wxString& name ); 00093 00095 wxIcon GetIconResource( const wxString& name ); 00097 00099 static bool ShowToolTips(); 00100 00103 private: 00104 NIREPDisplay *displayParent; 00105 int numberOfRows; 00106 int numberOfCols; 00107 wxTextCtrl* rowText; 00108 wxTextCtrl* colText; 00109 }; 00110 00111 #endif 00112 // _GETPANELFROMUSER_H_