X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da36f5446f10eace61869a3e42672667f344e63b..a61ddc471531869786496b6f3596380ac01202ed:/include/wx/resource.h diff --git a/include/wx/resource.h b/include/wx/resource.h index 86e126f833..bbd5aa1f75 100644 --- a/include/wx/resource.h +++ b/include/wx/resource.h @@ -6,7 +6,7 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_RESOURCEH__ @@ -42,16 +42,20 @@ #define wxDLG_POINT(x, y, parent, useDlgUnits) (useDlgUnits ? parent->ConvertDialogToPixel(wxPoint(x, y)) : wxPoint(x, y)) #define wxDLG_SIZE(x, y, parent, useDlgUnits) (useDlgUnits ? parent->ConvertDialogToPixel(wxSize(x, y)) : wxSize(x, y)) +#ifdef FindResource +#undef FindResource +#endif + /* * Internal format for control/panel item */ - + class WXDLLEXPORT wxItemResource: public wxObject { DECLARE_DYNAMIC_CLASS(wxItemResource) public: - + wxItemResource(); ~wxItemResource(); @@ -73,21 +77,21 @@ class WXDLLEXPORT wxItemResource: public wxObject inline void SetValue4(const wxString& v) { m_value4 = v; } inline void SetStringValues(const wxStringList& svalues) { m_stringValues = svalues; } - inline wxString GetType() const { return m_itemType; } + inline const wxString& GetType() const { return m_itemType; } inline int GetX() const { return m_x; } inline int GetY() const { return m_y; } inline int GetWidth() const { return m_width; } inline int GetHeight() const { return m_height; } - inline wxString GetTitle() const { return m_title; } - inline wxString GetName() const { return m_name; } + inline const wxString& GetTitle() const { return m_title; } + inline const wxString& GetName() const { return m_name; } inline long GetStyle() const { return m_windowStyle; } inline int GetId() const { return m_windowId; } - inline long GetValue1() const { return m_value1; } - inline long GetValue2() const { return m_value2; } - inline long GetValue3() const { return m_value3; } - inline long GetValue5() const { return m_value5; } + inline wxInt32 GetValue1() const { return m_value1; } + inline wxInt32 GetValue2() const { return m_value2; } + inline wxInt32 GetValue3() const { return m_value3; } + inline wxInt32 GetValue5() const { return m_value5; } inline wxString GetValue4() const { return m_value4; } inline wxList& GetChildren() const { return (wxList&) m_children; } inline wxStringList& GetStringValues() const { return (wxStringList&) m_stringValues; } @@ -101,7 +105,7 @@ class WXDLLEXPORT wxItemResource: public wxObject inline wxColour& GetButtonColour() const { return (wxColour&) m_buttonColour; } inline void SetResourceStyle(long style) { m_exStyle = style; } - inline long GetResourceStyle() const { return m_exStyle; } + inline wxInt32 GetResourceStyle() const { return m_exStyle; } protected: wxList m_children; @@ -155,35 +159,35 @@ class WXDLLEXPORT wxResourceTable: public wxHashTable virtual void ClearTable(); }; -extern void WXDLLEXPORT wxInitializeResourceSystem(); -extern void WXDLLEXPORT wxCleanUpResourceSystem(); +WXDLLEXPORT extern void wxInitializeResourceSystem(); +WXDLLEXPORT extern void wxCleanUpResourceSystem(); WXDLLEXPORT_DATA(extern wxResourceTable*) wxDefaultResourceTable; -extern long WXDLLEXPORT wxParseWindowStyle(const wxString& style); +WXDLLEXPORT extern long wxParseWindowStyle(const wxString& style); class WXDLLEXPORT wxMenuBar; class WXDLLEXPORT wxMenu; class WXDLLEXPORT wxBitmap; class WXDLLEXPORT wxIcon; -extern wxBitmap WXDLLEXPORT wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL); -extern wxIcon WXDLLEXPORT wxResourceCreateIcon(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL); -extern wxMenuBar* WXDLLEXPORT wxResourceCreateMenuBar(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL, wxMenuBar *menuBar = (wxMenuBar *) NULL); -extern wxMenu* WXDLLEXPORT wxResourceCreateMenu(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL); -extern bool WXDLLEXPORT wxResourceParseData(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL); -extern bool WXDLLEXPORT wxResourceParseFile(const wxString& filename, wxResourceTable *table = (wxResourceTable *) NULL); -extern bool WXDLLEXPORT wxResourceParseString(char* s, wxResourceTable *table = (wxResourceTable *) NULL); -extern void WXDLLEXPORT wxResourceClear(wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern wxIcon wxResourceCreateIcon(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern wxMenuBar* wxResourceCreateMenuBar(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL, wxMenuBar *menuBar = (wxMenuBar *) NULL); +WXDLLEXPORT extern wxMenu* wxResourceCreateMenu(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern bool wxResourceParseData(const wxString& resource, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern bool wxResourceParseFile(const wxString& filename, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern bool wxResourceParseString(char* s, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern void wxResourceClear(wxResourceTable *table = (wxResourceTable *) NULL); // Register XBM/XPM data -extern bool WXDLLEXPORT wxResourceRegisterBitmapData(const wxString& name, char bits[], int width, int height, wxResourceTable *table = (wxResourceTable *) NULL); -extern bool WXDLLEXPORT wxResourceRegisterBitmapData(const wxString& name, char **data, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern bool wxResourceRegisterBitmapData(const wxString& name, char bits[], int width, int height, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern bool wxResourceRegisterBitmapData(const wxString& name, char **data, wxResourceTable *table = (wxResourceTable *) NULL); #define wxResourceRegisterIconData wxResourceRegisterBitmapData /* * Resource identifer code: #define storage */ -extern bool WXDLLEXPORT wxResourceAddIdentifier(const wxString& name, int value, wxResourceTable *table = (wxResourceTable *) NULL); -extern int WXDLLEXPORT wxResourceGetIdentifier(const wxString& name, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern bool wxResourceAddIdentifier(const wxString& name, int value, wxResourceTable *table = (wxResourceTable *) NULL); +WXDLLEXPORT extern int wxResourceGetIdentifier(const wxString& name, wxResourceTable *table = (wxResourceTable *) NULL); #endif #endif