X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33d28952b29818b6931d91984a7b612a072d843d..e2473d4c48a842a960292abc555747f135f93cd0:/include/wx/paper.h diff --git a/include/wx/paper.h b/include/wx/paper.h index 1d9a7bb750..973a73312d 100644 --- a/include/wx/paper.h +++ b/include/wx/paper.h @@ -12,17 +12,18 @@ #ifndef _WX_PAPERH__ #define _WX_PAPERH__ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "paper.h" #endif #include "wx/defs.h" #include "wx/event.h" #include "wx/cmndata.h" +#include "wx/intl.h" /* * Paper type: see defs.h for wxPaperSize enum. - * A wxPrintePaperType can have an id and a name, or just a name and wxPAPER_NONE, + * A wxPrintPaperType can have an id and a name, or just a name and wxPAPER_NONE, * so you can add further paper types without needing new ids. */ @@ -40,7 +41,7 @@ public: // platformId is a platform-specific id, such as in Windows, DMPAPER_... wxPrintPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h); - inline const wxString& GetName() const { return m_paperName; } + inline wxString GetName() const { return wxGetTranslation(m_paperName); } inline wxPaperSize GetId() const { return m_paperId; } inline int GetPlatformId() const { return m_platformId; } @@ -68,10 +69,14 @@ private: DECLARE_DYNAMIC_CLASS(wxPrintPaperType) }; -class WXDLLEXPORT wxPrintPaperDatabase: public wxList +class WXDLLEXPORT wxStringToPrintPaperTypeHashMap; +class WXDLLEXPORT wxPrintPaperTypeList; + +class WXDLLEXPORT wxPrintPaperDatabase { public: wxPrintPaperDatabase(); + ~wxPrintPaperDatabase(); void CreateDatabase(); void ClearDatabase(); @@ -103,8 +108,13 @@ public: // Get the paper size wxPaperSize GetSize(const wxSize& size); + // + wxPrintPaperType* Item(size_t index) const; + size_t GetCount() const; private: - DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase) + wxStringToPrintPaperTypeHashMap* m_map; + wxPrintPaperTypeList* m_list; + // DECLARE_DYNAMIC_CLASS(wxPrintPaperDatabase) }; WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase;