X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bbcdf8bc7ca806d8278c7cb6d09d5590378b67d8..f3033278722328d37b98406b45060a2a3b8b1877:/utils/dialoged/src/reseditr.h diff --git a/utils/dialoged/src/reseditr.h b/utils/dialoged/src/reseditr.h index e2dafcc71c..5a87b10d06 100644 --- a/utils/dialoged/src/reseditr.h +++ b/utils/dialoged/src/reseditr.h @@ -24,8 +24,8 @@ #include "wx/resource.h" #include "wx/toolbar.h" #include "wx/imaglist.h" - -#include "proplist.h" +#include "wx/treectrl.h" +#include "wx/proplist.h" #include "symbtabl.h" #include "winstyle.h" @@ -76,7 +76,7 @@ class wxResourceEditorControlList; #ifdef __WXMSW__ #define wxHelpController wxWinHelpController #else -#define wxHelpController wxXLPHelpController; +#define wxHelpController wxHTMLHelpController; #endif class wxHelpController; @@ -117,7 +117,7 @@ class wxResourceTableWithSaving: public wxResourceTable m_styleTable.Init(); } virtual bool Save(const wxString& filename); - virtual bool SaveResource(ostream& stream, wxItemResource *item); + virtual bool SaveResource(ostream& stream, wxItemResource* item, wxItemResource* parentItem); void GeneratePanelStyleString(long windowStyle, char *buf); void GenerateDialogStyleString(long windowStyle, char *buf); @@ -144,8 +144,8 @@ class wxResourceTableWithSaving: public wxResourceTable bool GenerateStyle(char *buf, long windowStyle, long flag, char *strStyle); */ - void OutputFont(ostream& stream, wxFont *font); - wxControl *CreateItem(wxPanel *panel, wxItemResource *childResource); + void OutputFont(ostream& stream, const wxFont& font); + wxControl *CreateItem(wxPanel *panel, const wxItemResource *childResource, const wxItemResource* parentResource); protected: wxWindowStyleTable m_styleTable; @@ -191,7 +191,7 @@ public: virtual wxFrame *OnCreateEditorFrame(const char *title); virtual wxMenuBar *OnCreateEditorMenuBar(wxFrame *parent); virtual wxResourceEditorScrolledWindow *OnCreateEditorPanel(wxFrame *parent); - virtual wxToolBarBase *OnCreateToolBar(wxFrame *parent); + virtual wxToolBar *OnCreateToolBar(wxFrame *parent); // Create a window information object for the give window wxWindowPropertyInfo* CreatePropertyInfoForWindow(wxWindow *win); @@ -219,17 +219,17 @@ public: virtual bool DeleteResource(wxWindow *win); // Add bitmap resource if there isn't already one with this filename. - virtual char *AddBitmapResource(char *filename); + virtual wxString AddBitmapResource(const wxString& filename); // Delete the bitmap resource if it isn't being used by another resource. - virtual void PossiblyDeleteBitmapResource(char *resourceName); + virtual void PossiblyDeleteBitmapResource(const wxString& resourceName); // Helper function for above - virtual bool IsBitmapResourceUsed(char *resourceName); + virtual bool IsBitmapResourceUsed(const wxString& resourceName); - wxItemResource *FindBitmapResourceByFilename(char *filename); + wxItemResource *FindBitmapResourceByFilename(const wxString& filename); - char *FindBitmapFilenameForResource(wxItemResource *resource); + wxString FindBitmapFilenameForResource(wxItemResource *resource); // Is this window identifier in use? bool IsSymbolUsed(wxItemResource* thisResource, wxWindowID id) ; @@ -286,7 +286,9 @@ public: inline wxResourceEditorControlList *GetEditorControlList() const { return m_editorControlList; } inline wxList& GetSelections() { return m_selections; } inline wxMenu *GetPopupMenu() const { return m_popupMenu; } +#ifdef __WXMSW__ inline wxHelpController *GetHelpController() const { return m_helpController; } +#endif inline void Modify(bool mod = TRUE) { m_modified = mod; } inline bool Modified() const { return m_modified; } @@ -310,7 +312,9 @@ public: // Member variables protected: +#ifdef __WXMSW__ wxHelpController* m_helpController; +#endif wxResourceTableWithSaving m_resourceTable; wxFrame* m_editorFrame; wxResourceEditorScrolledWindow* m_editorPanel; @@ -353,7 +357,7 @@ class wxResourceEditorFrame: public wxFrame long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); ~wxResourceEditorFrame(); - bool OnClose(); + void OnCloseWindow(wxCloseEvent& event); void OnNew(wxCommandEvent& event); void OnOpen(wxCommandEvent& event); @@ -410,7 +414,6 @@ public: long style = wxTB_HORIZONTAL); bool OnLeftClick(int toolIndex, bool toggled); void OnMouseEnter(int toolIndex); - void OnPaint(wxPaintEvent& event); DECLARE_EVENT_TABLE() }; @@ -434,5 +437,19 @@ DECLARE_EVENT_TABLE() #define TOOLBAR_TO_BACK 17 #define TOOLBAR_COPY_SIZE 18 +/* + * this class is used to store data associated with a tree item + */ +class wxResourceTreeData : public wxTreeItemData +{ +public: + wxResourceTreeData(wxItemResource *resource) { m_resource = resource; } + + wxItemResource *GetResource() const { return m_resource; } + +private: + wxItemResource *m_resource; +}; + #endif