NIREP
|
00001 00002 // Name: ViewRDL.h 00003 // Purpose: A GUI that displays the RDL to the user who can then make 00004 // changes to the text and also save the RDL out to file. 00005 // Used by GenerateRDL. 00006 // Author: Jeffrey Hawley 00007 // Modified by: 00008 // Created: 22/07/2010 12:31:31 00009 // RCS-ID: 00010 // Copyright: 00011 // Licence: 00013 00014 #ifndef _VIEWRDL_H_ 00015 #define _VIEWRDL_H_ 00016 00017 00022 #include "wx/frame.h" 00023 #include "wx/richtext/richtextctrl.h" 00024 00025 #include "ResourceDescriptionList/ResourceDescriptionList.h" 00026 00035 #define SYMBOL_VIEWRDL_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX 00036 #define SYMBOL_VIEWRDL_TITLE _("ViewRDL") 00037 #define SYMBOL_VIEWRDL_IDNAME ID_VIEWRDL 00038 #define SYMBOL_VIEWRDL_SIZE wxSize(400, 350) 00039 #define SYMBOL_VIEWRDL_POSITION wxDefaultPosition 00040 00045 class ViewRDL: public wxFrame 00046 { 00047 DECLARE_CLASS( ViewRDL ) 00048 DECLARE_EVENT_TABLE() 00049 00050 public: 00052 00053 ViewRDL( wxWindow* parent,ResourceDescriptionList* rdl, wxWindowID id = SYMBOL_VIEWRDL_IDNAME, const wxString& caption = SYMBOL_VIEWRDL_TITLE, const wxPoint& pos = SYMBOL_VIEWRDL_POSITION, const wxSize& size = SYMBOL_VIEWRDL_SIZE, long style = SYMBOL_VIEWRDL_STYLE ); 00054 00055 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_VIEWRDL_IDNAME, const wxString& caption = SYMBOL_VIEWRDL_TITLE, const wxPoint& pos = SYMBOL_VIEWRDL_POSITION, const wxSize& size = SYMBOL_VIEWRDL_SIZE, long style = SYMBOL_VIEWRDL_STYLE ); 00056 00058 ~ViewRDL(); 00059 00061 void Init(); 00062 00064 void CreateControls(); 00065 00067 void OnBrowseClick( wxCommandEvent& event ); 00068 00070 void OnSaveClick( wxCommandEvent& event ); 00071 00073 void OnAppendClick( wxCommandEvent& event ); 00074 00076 void OnCancelClick( wxCommandEvent& event ); 00077 00079 wxBitmap GetBitmapResource( const wxString& name ); 00080 00082 wxIcon GetIconResource( const wxString& name ); 00083 00085 static bool ShowToolTips(); 00086 00087 private: 00088 enum{ 00089 ID_VIEWRDL=10067, 00090 ID_PANEL8, 00091 ID_TEXT, 00092 ID_FILE_LOCATION, 00093 ID_BROWSE, 00094 ID_SAVE, 00095 ID_APPEND 00096 }; 00097 00098 ViewRDL(); 00099 00100 ResourceDescriptionList* m_rdl; 00101 00102 }; 00103 00104 #endif 00105 // _VIEWRDL_H_