Replaced lots of ANSI/ASCII strings with their
Unicode equivalents, i.e. I put wxT() arounf them in lots of places. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
class WXDLLEXPORT wxCommand : public wxObject
|
class WXDLLEXPORT wxCommand : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCommand(bool canUndoIt = FALSE, const wxString& name = "");
|
wxCommand(bool canUndoIt = FALSE, const wxString& name = wxT(""));
|
||||||
~wxCommand();
|
~wxCommand();
|
||||||
|
|
||||||
// Override this to perform a command
|
// Override this to perform a command
|
||||||
|
@@ -1795,11 +1795,11 @@ enum wxPrintMode
|
|||||||
|
|
||||||
// macro to specify "All Files" on different platforms
|
// macro to specify "All Files" on different platforms
|
||||||
#if defined(__WXMSW__) || defined(__WXPM__)
|
#if defined(__WXMSW__) || defined(__WXPM__)
|
||||||
# define wxALL_FILES_PATTERN "*.*"
|
# define wxALL_FILES_PATTERN wxT("*.*")
|
||||||
# define wxALL_FILES gettext_noop("All files (*.*)|*.*")
|
# define wxALL_FILES gettext_noop(wxT("All files (*.*)|*.*"))
|
||||||
#else
|
#else
|
||||||
# define wxALL_FILES_PATTERN "*"
|
# define wxALL_FILES_PATTERN wxT("*")
|
||||||
# define wxALL_FILES gettext_noop("All files (*)|*")
|
# define wxALL_FILES gettext_noop(wxT("All files (*)|*"))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -29,26 +29,26 @@
|
|||||||
|
|
||||||
class WXDLLEXPORT wxDocMDIParentFrame: public wxMDIParentFrame
|
class WXDLLEXPORT wxDocMDIParentFrame: public wxMDIParentFrame
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxDocMDIParentFrame)
|
public:
|
||||||
public:
|
wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
|
||||||
wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
|
const wxString& title, const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxString& title, const wxPoint& pos = wxDefaultPosition,
|
const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
|
||||||
const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
|
|
||||||
|
|
||||||
// Extend event processing to search the document manager's event table
|
// Extend event processing to search the document manager's event table
|
||||||
virtual bool ProcessEvent(wxEvent& event);
|
virtual bool ProcessEvent(wxEvent& event);
|
||||||
|
|
||||||
wxDocManager *GetDocumentManager(void) const { return m_docManager; }
|
wxDocManager *GetDocumentManager(void) const { return m_docManager; }
|
||||||
|
|
||||||
void OnExit(wxCommandEvent& event);
|
void OnExit(wxCommandEvent& event);
|
||||||
void OnMRUFile(wxCommandEvent& event);
|
void OnMRUFile(wxCommandEvent& event);
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxDocManager *m_docManager;
|
wxDocManager *m_docManager;
|
||||||
|
|
||||||
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_CLASS(wxDocMDIParentFrame)
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -57,31 +57,31 @@ DECLARE_EVENT_TABLE()
|
|||||||
|
|
||||||
class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame
|
class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxDocMDIChildFrame)
|
public:
|
||||||
|
wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id,
|
||||||
|
const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
|
long type = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
|
||||||
|
~wxDocMDIChildFrame();
|
||||||
|
|
||||||
public:
|
// Extend event processing to search the view's event table
|
||||||
wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id,
|
virtual bool ProcessEvent(wxEvent& event);
|
||||||
const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
||||||
long type = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame");
|
|
||||||
~wxDocMDIChildFrame(void);
|
|
||||||
|
|
||||||
// Extend event processing to search the view's event table
|
void OnActivate(wxActivateEvent& event);
|
||||||
virtual bool ProcessEvent(wxEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
|
|
||||||
void OnActivate(wxActivateEvent& event);
|
inline wxDocument *GetDocument() const { return m_childDocument; }
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
inline wxView *GetView(void) const { return m_childView; }
|
||||||
|
inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
|
||||||
inline wxDocument *GetDocument(void) const { return m_childDocument; }
|
inline void SetView(wxView *view) { m_childView = view; }
|
||||||
inline wxView *GetView(void) const { return m_childView; }
|
bool Destroy() { m_childView = (wxView *)NULL; return wxMDIChildFrame::Destroy(); }
|
||||||
inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
|
|
||||||
inline void SetView(wxView *view) { m_childView = view; }
|
protected:
|
||||||
bool Destroy() { m_childView = (wxView *)NULL; return wxMDIChildFrame::Destroy(); }
|
wxDocument* m_childDocument;
|
||||||
protected:
|
wxView* m_childView;
|
||||||
wxDocument* m_childDocument;
|
|
||||||
wxView* m_childView;
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
DECLARE_CLASS(wxDocMDIChildFrame)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -64,8 +64,6 @@ enum
|
|||||||
|
|
||||||
class WXDLLEXPORT wxDocument : public wxEvtHandler
|
class WXDLLEXPORT wxDocument : public wxEvtHandler
|
||||||
{
|
{
|
||||||
DECLARE_ABSTRACT_CLASS(wxDocument)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDocument(wxDocument *parent = (wxDocument *) NULL);
|
wxDocument(wxDocument *parent = (wxDocument *) NULL);
|
||||||
~wxDocument();
|
~wxDocument();
|
||||||
@@ -160,12 +158,13 @@ protected:
|
|||||||
wxDocument* m_documentParent;
|
wxDocument* m_documentParent;
|
||||||
wxCommandProcessor* m_commandProcessor;
|
wxCommandProcessor* m_commandProcessor;
|
||||||
bool m_savedYet;
|
bool m_savedYet;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_ABSTRACT_CLASS(wxDocument)
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxView: public wxEvtHandler
|
class WXDLLEXPORT wxView: public wxEvtHandler
|
||||||
{
|
{
|
||||||
DECLARE_ABSTRACT_CLASS(wxView)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// wxView(wxDocument *doc = (wxDocument *) NULL);
|
// wxView(wxDocument *doc = (wxDocument *) NULL);
|
||||||
wxView();
|
wxView();
|
||||||
@@ -222,12 +221,14 @@ protected:
|
|||||||
wxDocument* m_viewDocument;
|
wxDocument* m_viewDocument;
|
||||||
wxString m_viewTypeName;
|
wxString m_viewTypeName;
|
||||||
wxWindow* m_viewFrame;
|
wxWindow* m_viewFrame;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_ABSTRACT_CLASS(wxView)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Represents user interface (and other) properties of documents and views
|
// Represents user interface (and other) properties of documents and views
|
||||||
class WXDLLEXPORT wxDocTemplate: public wxObject
|
class WXDLLEXPORT wxDocTemplate: public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxDocTemplate)
|
|
||||||
|
|
||||||
friend class WXDLLEXPORT wxDocManager;
|
friend class WXDLLEXPORT wxDocManager;
|
||||||
|
|
||||||
@@ -286,6 +287,9 @@ protected:
|
|||||||
// For dynamic creation of appropriate instances.
|
// For dynamic creation of appropriate instances.
|
||||||
wxClassInfo* m_docClassInfo;
|
wxClassInfo* m_docClassInfo;
|
||||||
wxClassInfo* m_viewClassInfo;
|
wxClassInfo* m_viewClassInfo;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_CLASS(wxDocTemplate)
|
||||||
};
|
};
|
||||||
|
|
||||||
// One object of this class may be created in an application, to manage all
|
// One object of this class may be created in an application, to manage all
|
||||||
@@ -427,8 +431,6 @@ protected:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxDocChildFrame : public wxFrame
|
class WXDLLEXPORT wxDocChildFrame : public wxFrame
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxDocChildFrame)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDocChildFrame(wxDocument *doc,
|
wxDocChildFrame(wxDocument *doc,
|
||||||
wxView *view,
|
wxView *view,
|
||||||
@@ -438,7 +440,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long type = wxDEFAULT_FRAME_STYLE,
|
long type = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = "frame");
|
const wxString& name = wxT("frame"));
|
||||||
~wxDocChildFrame();
|
~wxDocChildFrame();
|
||||||
|
|
||||||
// Extend event processing to search the view's event table
|
// Extend event processing to search the view's event table
|
||||||
@@ -457,6 +459,8 @@ protected:
|
|||||||
wxDocument* m_childDocument;
|
wxDocument* m_childDocument;
|
||||||
wxView* m_childView;
|
wxView* m_childView;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_CLASS(wxDocChildFrame)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -466,8 +470,6 @@ protected:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxDocParentFrame : public wxFrame
|
class WXDLLEXPORT wxDocParentFrame : public wxFrame
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxDocParentFrame)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDocParentFrame(wxDocManager *manager,
|
wxDocParentFrame(wxDocManager *manager,
|
||||||
wxFrame *frame,
|
wxFrame *frame,
|
||||||
@@ -476,7 +478,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long type = wxDEFAULT_FRAME_STYLE,
|
long type = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = "frame");
|
const wxString& name = wxT("frame"));
|
||||||
|
|
||||||
// Extend event processing to search the document manager's event table
|
// Extend event processing to search the document manager's event table
|
||||||
virtual bool ProcessEvent(wxEvent& event);
|
virtual bool ProcessEvent(wxEvent& event);
|
||||||
@@ -490,6 +492,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
wxDocManager *m_docManager;
|
wxDocManager *m_docManager;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_CLASS(wxDocParentFrame)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -500,10 +504,8 @@ protected:
|
|||||||
#if wxUSE_PRINTING_ARCHITECTURE
|
#if wxUSE_PRINTING_ARCHITECTURE
|
||||||
class WXDLLEXPORT wxDocPrintout : public wxPrintout
|
class WXDLLEXPORT wxDocPrintout : public wxPrintout
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxDocPrintout)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxDocPrintout(wxView *view = (wxView *) NULL, const wxString& title = "Printout");
|
wxDocPrintout(wxView *view = (wxView *) NULL, const wxString& title = wxT("Printout"));
|
||||||
bool OnPrintPage(int page);
|
bool OnPrintPage(int page);
|
||||||
bool HasPage(int page);
|
bool HasPage(int page);
|
||||||
bool OnBeginDocument(int startPage, int endPage);
|
bool OnBeginDocument(int startPage, int endPage);
|
||||||
@@ -513,6 +515,9 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxView* m_printoutView;
|
wxView* m_printoutView;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxDocPrintout)
|
||||||
};
|
};
|
||||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||||
|
|
||||||
@@ -522,8 +527,6 @@ protected:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxFileHistory : public wxObject
|
class WXDLLEXPORT wxFileHistory : public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxFileHistory)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxFileHistory(int maxFiles = 9);
|
wxFileHistory(int maxFiles = 9);
|
||||||
~wxFileHistory();
|
~wxFileHistory();
|
||||||
@@ -563,6 +566,9 @@ protected:
|
|||||||
wxList m_fileMenus;
|
wxList m_fileMenus;
|
||||||
// Max files to maintain
|
// Max files to maintain
|
||||||
int m_fileMaxFiles;
|
int m_fileMaxFiles;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxFileHistory)
|
||||||
};
|
};
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
|
@@ -86,7 +86,7 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase)
|
|||||||
@file Name of help directory.
|
@file Name of help directory.
|
||||||
@return true on success
|
@return true on success
|
||||||
*/
|
*/
|
||||||
virtual bool LoadFile(const wxString& file = "");
|
virtual bool LoadFile(const wxString& file = wxT(""));
|
||||||
|
|
||||||
/** Display list of all help entries.
|
/** Display list of all help entries.
|
||||||
@return true on success
|
@return true on success
|
||||||
|
@@ -61,9 +61,7 @@ enum wxLayoutAlignment
|
|||||||
|
|
||||||
class WXDLLEXPORT wxQueryLayoutInfoEvent: public wxEvent
|
class WXDLLEXPORT wxQueryLayoutInfoEvent: public wxEvent
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxQueryLayoutInfoEvent)
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxQueryLayoutInfoEvent(wxWindowID id = 0)
|
wxQueryLayoutInfoEvent(wxWindowID id = 0)
|
||||||
{
|
{
|
||||||
SetEventType(wxEVT_QUERY_LAYOUT_INFO);
|
SetEventType(wxEVT_QUERY_LAYOUT_INFO);
|
||||||
@@ -99,7 +97,9 @@ protected:
|
|||||||
wxSize m_size;
|
wxSize m_size;
|
||||||
wxLayoutOrientation m_orientation;
|
wxLayoutOrientation m_orientation;
|
||||||
wxLayoutAlignment m_alignment;
|
wxLayoutAlignment m_alignment;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxQueryLayoutInfoEvent)
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&);
|
typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEvent&);
|
||||||
@@ -113,7 +113,6 @@ typedef void (wxEvtHandler::*wxQueryLayoutInfoEventFunction)(wxQueryLayoutInfoEv
|
|||||||
|
|
||||||
class WXDLLEXPORT wxCalculateLayoutEvent: public wxEvent
|
class WXDLLEXPORT wxCalculateLayoutEvent: public wxEvent
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxCalculateLayoutEvent)
|
|
||||||
public:
|
public:
|
||||||
wxCalculateLayoutEvent(wxWindowID id = 0)
|
wxCalculateLayoutEvent(wxWindowID id = 0)
|
||||||
{
|
{
|
||||||
@@ -135,6 +134,9 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
int m_flags;
|
int m_flags;
|
||||||
wxRect m_rect;
|
wxRect m_rect;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxCalculateLayoutEvent)
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&);
|
typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEvent&);
|
||||||
@@ -149,7 +151,6 @@ typedef void (wxEvtHandler::*wxCalculateLayoutEventFunction)(wxCalculateLayoutEv
|
|||||||
// an IDE-style interface.
|
// an IDE-style interface.
|
||||||
class WXDLLEXPORT wxSashLayoutWindow: public wxSashWindow
|
class WXDLLEXPORT wxSashLayoutWindow: public wxSashWindow
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxSashLayoutWindow)
|
|
||||||
public:
|
public:
|
||||||
wxSashLayoutWindow()
|
wxSashLayoutWindow()
|
||||||
{
|
{
|
||||||
@@ -157,13 +158,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow")
|
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow"))
|
||||||
{
|
{
|
||||||
Create(parent, id, pos, size, style, name);
|
Create(parent, id, pos, size, style, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow");
|
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("layoutWindow"));
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
inline wxLayoutAlignment GetAlignment() const { return m_alignment; };
|
inline wxLayoutAlignment GetAlignment() const { return m_alignment; };
|
||||||
@@ -190,7 +191,9 @@ private:
|
|||||||
wxLayoutOrientation m_orientation;
|
wxLayoutOrientation m_orientation;
|
||||||
wxSize m_defaultSize;
|
wxSize m_defaultSize;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
private:
|
||||||
|
DECLARE_CLASS(wxSashLayoutWindow)
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxUSE_SASH
|
#endif // wxUSE_SASH
|
||||||
|
@@ -72,7 +72,7 @@ public:
|
|||||||
const wxSize &size = wxDefaultSize,
|
const wxSize &size = wxDefaultSize,
|
||||||
long style = wxLC_ICON,
|
long style = wxLC_ICON,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString &name = "listctrl" )
|
const wxString &name = wxT("listctrl") )
|
||||||
{
|
{
|
||||||
Create(parent, id, pos, size, style, validator, name);
|
Create(parent, id, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
const wxSize &size = wxDefaultSize,
|
const wxSize &size = wxDefaultSize,
|
||||||
long style = wxLC_ICON,
|
long style = wxLC_ICON,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString &name = "listctrl" );
|
const wxString &name = wxT("listctrl") );
|
||||||
|
|
||||||
bool GetColumn( int col, wxListItem& item ) const;
|
bool GetColumn( int col, wxListItem& item ) const;
|
||||||
bool SetColumn( int col, wxListItem& item );
|
bool SetColumn( int col, wxListItem& item );
|
||||||
@@ -246,7 +246,7 @@ public:
|
|||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxLC_ICON,
|
long style = wxLC_ICON,
|
||||||
const wxValidator &validator = wxDefaultValidator,
|
const wxValidator &validator = wxDefaultValidator,
|
||||||
const wxString &name = "listctrl" )
|
const wxString &name = wxT("listctrl") )
|
||||||
: wxGenericListCtrl(parent, id, pos, size, style, validator, name)
|
: wxGenericListCtrl(parent, id, pos, size, style, validator, name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -69,13 +69,7 @@ public:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxSashWindow: public wxWindow
|
class WXDLLEXPORT wxSashWindow: public wxWindow
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxSashWindow)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Public API
|
|
||||||
|
|
||||||
// Default constructor
|
// Default constructor
|
||||||
wxSashWindow()
|
wxSashWindow()
|
||||||
{
|
{
|
||||||
@@ -84,7 +78,7 @@ public:
|
|||||||
|
|
||||||
// Normal constructor
|
// Normal constructor
|
||||||
wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow")
|
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow"))
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
Create(parent, id, pos, size, style, name);
|
Create(parent, id, pos, size, style, name);
|
||||||
@@ -93,7 +87,7 @@ public:
|
|||||||
~wxSashWindow();
|
~wxSashWindow();
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow");
|
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = wxT("sashWindow"));
|
||||||
|
|
||||||
// Set whether there's a sash in this position
|
// Set whether there's a sash in this position
|
||||||
void SetSashVisible(wxSashEdgePosition edge, bool sash);
|
void SetSashVisible(wxSashEdgePosition edge, bool sash);
|
||||||
@@ -196,7 +190,9 @@ private:
|
|||||||
bool m_mouseCaptured;
|
bool m_mouseCaptured;
|
||||||
wxCursor* m_currentCursor;
|
wxCursor* m_currentCursor;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxSashWindow)
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
BEGIN_DECLARE_EVENT_TYPES()
|
BEGIN_DECLARE_EVENT_TYPES()
|
||||||
@@ -213,9 +209,7 @@ enum wxSashDragStatus
|
|||||||
|
|
||||||
class WXDLLEXPORT wxSashEvent: public wxCommandEvent
|
class WXDLLEXPORT wxSashEvent: public wxCommandEvent
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxSashEvent)
|
public:
|
||||||
|
|
||||||
public:
|
|
||||||
inline wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE) {
|
inline wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE) {
|
||||||
m_eventType = (wxEventType) wxEVT_SASH_DRAGGED; m_id = id; m_edge = edge; }
|
m_eventType = (wxEventType) wxEVT_SASH_DRAGGED; m_id = id; m_edge = edge; }
|
||||||
|
|
||||||
@@ -230,10 +224,14 @@ class WXDLLEXPORT wxSashEvent: public wxCommandEvent
|
|||||||
//// dragging the top below the bottom)
|
//// dragging the top below the bottom)
|
||||||
inline void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; }
|
inline void SetDragStatus(wxSashDragStatus status) { m_dragStatus = status; }
|
||||||
inline wxSashDragStatus GetDragStatus() const { return m_dragStatus; }
|
inline wxSashDragStatus GetDragStatus() const { return m_dragStatus; }
|
||||||
private:
|
|
||||||
|
private:
|
||||||
wxSashEdgePosition m_edge;
|
wxSashEdgePosition m_edge;
|
||||||
wxRect m_dragRect;
|
wxRect m_dragRect;
|
||||||
wxSashDragStatus m_dragStatus;
|
wxSashDragStatus m_dragStatus;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxSashEvent)
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&);
|
typedef void (wxEvtHandler::*wxSashEventFunction)(wxSashEvent&);
|
||||||
|
@@ -71,7 +71,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSP_3D,
|
long style = wxSP_3D,
|
||||||
const wxString& name = "splitter")
|
const wxString& name = wxT("splitter"))
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
Create(parent, id, pos, size, style, name);
|
Create(parent, id, pos, size, style, name);
|
||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxSP_3D,
|
long style = wxSP_3D,
|
||||||
const wxString& name = "splitter");
|
const wxString& name = wxT("splitter"));
|
||||||
|
|
||||||
// Gets the only or left/top pane
|
// Gets the only or left/top pane
|
||||||
wxWindow *GetWindow1() const { return m_windowOne; }
|
wxWindow *GetWindow1() const { return m_windowOne; }
|
||||||
|
@@ -29,8 +29,6 @@ class wxMouseEvent;
|
|||||||
|
|
||||||
class WXDLLEXPORT wxTreeLayout: public wxObject
|
class WXDLLEXPORT wxTreeLayout: public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_ABSTRACT_CLASS(wxTreeLayout)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxTreeLayout();
|
wxTreeLayout();
|
||||||
virtual ~wxTreeLayout() { }
|
virtual ~wxTreeLayout() { }
|
||||||
@@ -49,7 +47,7 @@ public:
|
|||||||
// Optional redefinition
|
// Optional redefinition
|
||||||
void Initialize(void);
|
void Initialize(void);
|
||||||
inline virtual void SetNodeName(long WXUNUSED(id), const wxString& WXUNUSED(name)) {}
|
inline virtual void SetNodeName(long WXUNUSED(id), const wxString& WXUNUSED(name)) {}
|
||||||
inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(""); }
|
inline virtual wxString GetNodeName(long WXUNUSED(id)) { return wxString(wxT("")); }
|
||||||
virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
|
virtual void GetNodeSize(long id, long *x, long *y, wxDC& dc);
|
||||||
virtual void Draw(wxDC& dc);
|
virtual void Draw(wxDC& dc);
|
||||||
virtual void DrawNodes(wxDC& dc);
|
virtual void DrawNodes(wxDC& dc);
|
||||||
@@ -76,8 +74,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
void CalcLayout(long node_id, int level, wxDC& dc);
|
void CalcLayout(long node_id, int level, wxDC& dc);
|
||||||
|
|
||||||
// Members
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
long m_parentNode;
|
long m_parentNode;
|
||||||
long m_lastY;
|
long m_lastY;
|
||||||
@@ -87,6 +83,9 @@ protected:
|
|||||||
long m_topMargin;
|
long m_topMargin;
|
||||||
long m_leftMargin;
|
long m_leftMargin;
|
||||||
bool m_orientation; // TRUE for top-to-bottom, FALSE for left-to-right
|
bool m_orientation; // TRUE for top-to-bottom, FALSE for left-to-right
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_ABSTRACT_CLASS(wxTreeLayout)
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxStoredNode
|
class WXDLLEXPORT wxStoredNode
|
||||||
@@ -105,7 +104,6 @@ public:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxTreeLayoutStored: public wxTreeLayout
|
class WXDLLEXPORT wxTreeLayoutStored: public wxTreeLayout
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxTreeLayoutStored)
|
|
||||||
public:
|
public:
|
||||||
wxTreeLayoutStored(int noNodes = 200);
|
wxTreeLayoutStored(int noNodes = 200);
|
||||||
virtual ~wxTreeLayoutStored(void);
|
virtual ~wxTreeLayoutStored(void);
|
||||||
@@ -130,7 +128,7 @@ public:
|
|||||||
virtual void SetClientData(long id, long clientData);
|
virtual void SetClientData(long id, long clientData);
|
||||||
virtual long GetClientData(long id) const;
|
virtual long GetClientData(long id) const;
|
||||||
|
|
||||||
virtual long AddChild(const wxString& name, const wxString& parent = "");
|
virtual long AddChild(const wxString& name, const wxString& parent = wxT(""));
|
||||||
virtual long AddChild(const wxString& name, long parent);
|
virtual long AddChild(const wxString& name, long parent);
|
||||||
virtual long NameToId(const wxString& name);
|
virtual long NameToId(const wxString& name);
|
||||||
|
|
||||||
@@ -139,6 +137,9 @@ private:
|
|||||||
wxStoredNode* m_nodes;
|
wxStoredNode* m_nodes;
|
||||||
int m_num;
|
int m_num;
|
||||||
int m_maxNodes;
|
int m_maxNodes;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxTreeLayoutStored)
|
||||||
};
|
};
|
||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
|
@@ -47,7 +47,7 @@ public:
|
|||||||
|
|
||||||
// Implicit conversion from the colour name
|
// Implicit conversion from the colour name
|
||||||
wxColour( const wxString &colourName ) { InitFromName(colourName); }
|
wxColour( const wxString &colourName ) { InitFromName(colourName); }
|
||||||
wxColour( const char *colourName ) { InitFromName(colourName); }
|
wxColour( const char *colourName ) { InitFromName( wxString::FromAscii(colourName) ); }
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
wxColour( const wxChar *colourName ) { InitFromName( wxString(colourName) ); }
|
wxColour( const wxChar *colourName ) { InitFromName( wxString(colourName) ); }
|
||||||
#endif
|
#endif
|
||||||
|
@@ -47,7 +47,7 @@ public:
|
|||||||
|
|
||||||
// Implicit conversion from the colour name
|
// Implicit conversion from the colour name
|
||||||
wxColour( const wxString &colourName ) { InitFromName(colourName); }
|
wxColour( const wxString &colourName ) { InitFromName(colourName); }
|
||||||
wxColour( const char *colourName ) { InitFromName(colourName); }
|
wxColour( const char *colourName ) { InitFromName( wxString::FromAscii(colourName) ); }
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
wxColour( const wxChar *colourName ) { InitFromName( wxString(colourName) ); }
|
wxColour( const wxChar *colourName ) { InitFromName( wxString(colourName) ); }
|
||||||
#endif
|
#endif
|
||||||
|
@@ -31,11 +31,9 @@
|
|||||||
// Defines the API for help controllers
|
// Defines the API for help controllers
|
||||||
class WXDLLEXPORT wxHelpControllerBase: public wxObject
|
class WXDLLEXPORT wxHelpControllerBase: public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxHelpControllerBase)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline wxHelpControllerBase() {}
|
inline wxHelpControllerBase() {}
|
||||||
inline ~wxHelpControllerBase() {};
|
inline ~wxHelpControllerBase() {}
|
||||||
|
|
||||||
// Must call this to set the filename and server name.
|
// Must call this to set the filename and server name.
|
||||||
// server is only required when implementing TCP/IP-based
|
// server is only required when implementing TCP/IP-based
|
||||||
@@ -47,7 +45,7 @@ public:
|
|||||||
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
|
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
|
||||||
|
|
||||||
// If file is "", reloads file given in Initialize
|
// If file is "", reloads file given in Initialize
|
||||||
virtual bool LoadFile(const wxString& file = "") = 0;
|
virtual bool LoadFile(const wxString& file = wxT("")) = 0;
|
||||||
|
|
||||||
// Displays the contents
|
// Displays the contents
|
||||||
virtual bool DisplayContents(void) = 0;
|
virtual bool DisplayContents(void) = 0;
|
||||||
@@ -59,11 +57,11 @@ public:
|
|||||||
virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return FALSE; };
|
virtual bool DisplayContextPopup(int WXUNUSED(contextId)) { return FALSE; };
|
||||||
|
|
||||||
// Display the text in a popup, if possible
|
// Display the text in a popup, if possible
|
||||||
virtual bool DisplayTextPopup(const wxString& WXUNUSED(text), const wxPoint& WXUNUSED(pos)) { return FALSE; };
|
virtual bool DisplayTextPopup(const wxString& WXUNUSED(text), const wxPoint& WXUNUSED(pos)) { return FALSE; }
|
||||||
|
|
||||||
// By default, uses KeywordSection to display a topic. Implementations
|
// By default, uses KeywordSection to display a topic. Implementations
|
||||||
// may override this for more specific behaviour.
|
// may override this for more specific behaviour.
|
||||||
virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); };
|
virtual bool DisplaySection(const wxString& section) { return KeywordSearch(section); }
|
||||||
virtual bool DisplayBlock(long blockNo) = 0;
|
virtual bool DisplayBlock(long blockNo) = 0;
|
||||||
virtual bool KeywordSearch(const wxString& k) = 0;
|
virtual bool KeywordSearch(const wxString& k) = 0;
|
||||||
/// Allows one to override the default settings for the help frame.
|
/// Allows one to override the default settings for the help frame.
|
||||||
@@ -80,11 +78,14 @@ public:
|
|||||||
wxPoint *WXUNUSED(pos) = NULL,
|
wxPoint *WXUNUSED(pos) = NULL,
|
||||||
bool *WXUNUSED(newFrameEachTime) = NULL)
|
bool *WXUNUSED(newFrameEachTime) = NULL)
|
||||||
{
|
{
|
||||||
return (wxFrame*) NULL;// does nothing by default
|
return (wxFrame*) NULL; // does nothing by default
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool Quit(void) = 0;
|
virtual bool Quit() = 0;
|
||||||
virtual void OnQuit(void) {};
|
virtual void OnQuit() {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_CLASS(wxHelpControllerBase)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // wxUSE_HELP
|
#endif // wxUSE_HELP
|
||||||
|
@@ -57,7 +57,7 @@ public:
|
|||||||
virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize(file); }
|
virtual bool Initialize(const wxString& file, int WXUNUSED(server) ) { return Initialize(file); }
|
||||||
virtual bool Initialize(const wxString& file);
|
virtual bool Initialize(const wxString& file);
|
||||||
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
|
virtual void SetViewer(const wxString& WXUNUSED(viewer), long WXUNUSED(flags) = 0) {}
|
||||||
virtual bool LoadFile(const wxString& file = "");
|
virtual bool LoadFile(const wxString& file = wxT(""));
|
||||||
virtual bool DisplaySection(int sectionNo);
|
virtual bool DisplaySection(int sectionNo);
|
||||||
virtual bool DisplaySection(const wxString& section) { return Display(section); }
|
virtual bool DisplaySection(const wxString& section) { return Display(section); }
|
||||||
virtual bool DisplayBlock(long blockNo) { return DisplaySection(blockNo); }
|
virtual bool DisplayBlock(long blockNo) { return DisplaySection(blockNo); }
|
||||||
|
@@ -98,7 +98,7 @@ enum {
|
|||||||
class WXDLLEXPORT wxHtmlPrintout : public wxPrintout
|
class WXDLLEXPORT wxHtmlPrintout : public wxPrintout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxHtmlPrintout(const wxString& title = "Printout");
|
wxHtmlPrintout(const wxString& title = wxT("Printout"));
|
||||||
~wxHtmlPrintout();
|
~wxHtmlPrintout();
|
||||||
|
|
||||||
void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, bool isdir = TRUE);
|
void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, bool isdir = TRUE);
|
||||||
@@ -176,7 +176,7 @@ private:
|
|||||||
class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject
|
class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxHtmlEasyPrinting(const wxString& name = "Printing", wxFrame *parent_frame = NULL);
|
wxHtmlEasyPrinting(const wxString& name = wxT("Printing"), wxFrame *parent_frame = NULL);
|
||||||
~wxHtmlEasyPrinting();
|
~wxHtmlEasyPrinting();
|
||||||
|
|
||||||
bool PreviewFile(const wxString &htmlfile);
|
bool PreviewFile(const wxString &htmlfile);
|
||||||
|
@@ -44,7 +44,7 @@ public:
|
|||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxLC_REPORT,
|
long style = wxLC_REPORT,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString &name = "listctrl" )
|
const wxString &name = wxT("listctrl") )
|
||||||
{
|
{
|
||||||
Create(parent, id, pos, size, style, validator, name);
|
Create(parent, id, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
|
@@ -53,8 +53,6 @@ enum wxPrinterError
|
|||||||
|
|
||||||
class WXDLLEXPORT wxPrinterBase: public wxObject
|
class WXDLLEXPORT wxPrinterBase: public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxPrinterBase)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxPrinterBase(wxPrintDialogData *data = (wxPrintDialogData *) NULL);
|
wxPrinterBase(wxPrintDialogData *data = (wxPrintDialogData *) NULL);
|
||||||
virtual ~wxPrinterBase();
|
virtual ~wxPrinterBase();
|
||||||
@@ -85,6 +83,8 @@ public:
|
|||||||
static wxWindow* sm_abortWindow;
|
static wxWindow* sm_abortWindow;
|
||||||
static bool sm_abortIt;
|
static bool sm_abortIt;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_CLASS(wxPrinterBase)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -97,10 +97,8 @@ public:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxPrintout: public wxObject
|
class WXDLLEXPORT wxPrintout: public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_ABSTRACT_CLASS(wxPrintout)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxPrintout(const wxString& title = "Printout");
|
wxPrintout(const wxString& title = wxT("Printout"));
|
||||||
virtual ~wxPrintout();
|
virtual ~wxPrintout();
|
||||||
|
|
||||||
virtual bool OnBeginDocument(int startPage, int endPage);
|
virtual bool OnBeginDocument(int startPage, int endPage);
|
||||||
@@ -149,6 +147,9 @@ private:
|
|||||||
int m_PPIPrinterY;
|
int m_PPIPrinterY;
|
||||||
|
|
||||||
bool m_isPreview;
|
bool m_isPreview;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_ABSTRACT_CLASS(wxPrintout)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -158,15 +159,13 @@ private:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxPreviewCanvas: public wxScrolledWindow
|
class WXDLLEXPORT wxPreviewCanvas: public wxScrolledWindow
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxPreviewCanvas)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxPreviewCanvas(wxPrintPreviewBase *preview,
|
wxPreviewCanvas(wxPrintPreviewBase *preview,
|
||||||
wxWindow *parent,
|
wxWindow *parent,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = "canvas");
|
const wxString& name = wxT("canvas"));
|
||||||
~wxPreviewCanvas();
|
~wxPreviewCanvas();
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
@@ -177,6 +176,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxPrintPreviewBase* m_printPreview;
|
wxPrintPreviewBase* m_printPreview;
|
||||||
|
|
||||||
|
DECLARE_CLASS(wxPreviewCanvas)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -187,16 +187,14 @@ private:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxPreviewFrame: public wxFrame
|
class WXDLLEXPORT wxPreviewFrame: public wxFrame
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(wxPreviewFrame)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxPreviewFrame(wxPrintPreviewBase *preview,
|
wxPreviewFrame(wxPrintPreviewBase *preview,
|
||||||
wxFrame *parent,
|
wxFrame *parent,
|
||||||
const wxString& title = "Print Preview",
|
const wxString& title = wxT("Print Preview"),
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE,
|
long style = wxDEFAULT_FRAME_STYLE,
|
||||||
const wxString& name = "frame");
|
const wxString& name = wxT("frame"));
|
||||||
~wxPreviewFrame();
|
~wxPreviewFrame();
|
||||||
|
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
@@ -209,6 +207,7 @@ protected:
|
|||||||
wxPrintPreviewBase* m_printPreview;
|
wxPrintPreviewBase* m_printPreview;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
DECLARE_CLASS(wxPreviewFrame)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -251,7 +250,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = "panel");
|
const wxString& name = wxT("panel"));
|
||||||
~wxPreviewControlBar();
|
~wxPreviewControlBar();
|
||||||
|
|
||||||
virtual void CreateButtons();
|
virtual void CreateButtons();
|
||||||
@@ -392,7 +391,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = "dialog")
|
const wxString& name = wxT("dialog"))
|
||||||
: wxDialog(parent, -1, title, pos, size, style, name)
|
: wxDialog(parent, -1, title, pos, size, style, name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -43,44 +43,47 @@ class wxPropertyValidatorRegistry;
|
|||||||
// A storable sheet of values
|
// A storable sheet of values
|
||||||
class WXDLLEXPORT wxPropertySheet: public wxObject
|
class WXDLLEXPORT wxPropertySheet: public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPropertySheet)
|
public:
|
||||||
public:
|
wxPropertySheet(const wxString& name = wxT(""));
|
||||||
wxPropertySheet(const wxString& name = "");
|
~wxPropertySheet();
|
||||||
~wxPropertySheet(void);
|
|
||||||
|
|
||||||
// Set the name of the sheet
|
// Set the name of the sheet
|
||||||
inline virtual void SetName(const wxString& name) { m_name=name; }
|
inline virtual void SetName(const wxString& name) { m_name=name; }
|
||||||
inline virtual wxString GetName() const { return m_name; }
|
inline virtual wxString GetName() const { return m_name; }
|
||||||
// Does this sheet contain a property with this name
|
|
||||||
virtual bool HasProperty(const wxString& name) const;
|
// Does this sheet contain a property with this name
|
||||||
|
virtual bool HasProperty(const wxString& name) const;
|
||||||
|
|
||||||
// Set property name to value
|
// Set property name to value
|
||||||
virtual bool SetProperty(const wxString& name, const wxPropertyValue& value);
|
virtual bool SetProperty(const wxString& name, const wxPropertyValue& value);
|
||||||
|
|
||||||
// Remove property from sheet by name, deleting it
|
// Remove property from sheet by name, deleting it
|
||||||
virtual void RemoveProperty(const wxString& name);
|
virtual void RemoveProperty(const wxString& name);
|
||||||
|
|
||||||
// Get the name of the sheet
|
// Get the name of the sheet
|
||||||
// Add a property
|
// Add a property
|
||||||
virtual void AddProperty(wxProperty *property);
|
virtual void AddProperty(wxProperty *property);
|
||||||
|
|
||||||
// Get property by name
|
// Get property by name
|
||||||
virtual wxProperty *GetProperty(const wxString& name) const;
|
virtual wxProperty *GetProperty(const wxString& name) const;
|
||||||
|
|
||||||
// Clear all properties
|
// Clear all properties
|
||||||
virtual void Clear(void);
|
virtual void Clear();
|
||||||
|
|
||||||
virtual void UpdateAllViews(wxPropertyView *thisView = NULL);
|
virtual void UpdateAllViews(wxPropertyView *thisView = NULL);
|
||||||
inline virtual wxList& GetProperties(void) const { return (wxList&) m_properties; }
|
inline virtual wxList& GetProperties() const { return (wxList&) m_properties; }
|
||||||
|
|
||||||
// Sets/clears the modified flag for each property value
|
// Sets/clears the modified flag for each property value
|
||||||
virtual void SetAllModified(bool flag = TRUE);
|
virtual void SetAllModified(bool flag = TRUE);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxObject* m_viewedObject;
|
wxObject* m_viewedObject;
|
||||||
wxList m_properties;
|
wxList m_properties;
|
||||||
wxPropertyView* m_propertyView;
|
wxPropertyView* m_propertyView;
|
||||||
wxString m_name;
|
wxString m_name;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxPropertySheet)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -88,71 +91,69 @@ class WXDLLEXPORT wxPropertySheet: public wxObject
|
|||||||
// classes: wxPropertyListView, and wxPropertyFormView.
|
// classes: wxPropertyListView, and wxPropertyFormView.
|
||||||
class WXDLLEXPORT wxPropertyView: public wxEvtHandler
|
class WXDLLEXPORT wxPropertyView: public wxEvtHandler
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPropertyView)
|
public:
|
||||||
public:
|
wxPropertyView(long flags = 0);
|
||||||
wxPropertyView(long flags = 0);
|
~wxPropertyView();
|
||||||
~wxPropertyView(void);
|
|
||||||
|
|
||||||
// Associates and shows the view
|
// Associates and shows the view
|
||||||
virtual void ShowView(wxPropertySheet *WXUNUSED(propertySheet), wxWindow *WXUNUSED(panel)) {}
|
virtual void ShowView(wxPropertySheet *WXUNUSED(propertySheet), wxWindow *WXUNUSED(panel)) {}
|
||||||
|
|
||||||
// Update this view of the viewed object, called e.g. by
|
// Update this view of the viewed object, called e.g. by
|
||||||
// the object itself.
|
// the object itself.
|
||||||
virtual bool OnUpdateView(void) {return FALSE;};
|
virtual bool OnUpdateView() {return FALSE;};
|
||||||
|
|
||||||
// Override this to do something as soon as the property changed,
|
// Override this to do something as soon as the property changed,
|
||||||
// if the view and validators support it.
|
// if the view and validators support it.
|
||||||
virtual void OnPropertyChanged(wxProperty *WXUNUSED(property)) {}
|
virtual void OnPropertyChanged(wxProperty *WXUNUSED(property)) {}
|
||||||
|
|
||||||
virtual void AddRegistry(wxPropertyValidatorRegistry *registry);
|
virtual void AddRegistry(wxPropertyValidatorRegistry *registry);
|
||||||
inline virtual wxList& GetRegistryList(void) const
|
inline virtual wxList& GetRegistryList() const
|
||||||
{ return (wxList&) m_validatorRegistryList; }
|
{ return (wxList&) m_validatorRegistryList; }
|
||||||
|
|
||||||
virtual wxPropertyValidator *FindPropertyValidator(wxProperty *property);
|
virtual wxPropertyValidator *FindPropertyValidator(wxProperty *property);
|
||||||
inline virtual void SetPropertySheet(wxPropertySheet *sheet) { m_propertySheet = sheet; }
|
inline virtual void SetPropertySheet(wxPropertySheet *sheet) { m_propertySheet = sheet; }
|
||||||
inline virtual wxPropertySheet *GetPropertySheet(void) const { return m_propertySheet; }
|
inline virtual wxPropertySheet *GetPropertySheet() const { return m_propertySheet; }
|
||||||
|
|
||||||
/*
|
inline virtual bool OnClose() { return FALSE; }
|
||||||
virtual void OnOk(void) {};
|
inline long GetFlags(void) { return m_buttonFlags; }
|
||||||
virtual void OnCancel(void) {};
|
|
||||||
virtual void OnHelp(void) {};
|
|
||||||
*/
|
|
||||||
|
|
||||||
inline virtual bool OnClose(void) { return FALSE; }
|
protected:
|
||||||
inline long GetFlags(void) { return m_buttonFlags; }
|
long m_buttonFlags;
|
||||||
|
wxPropertySheet* m_propertySheet;
|
||||||
protected:
|
wxProperty* m_currentProperty;
|
||||||
long m_buttonFlags;
|
wxList m_validatorRegistryList;
|
||||||
wxPropertySheet* m_propertySheet;
|
wxPropertyValidator* m_currentValidator;
|
||||||
wxProperty* m_currentProperty;
|
|
||||||
wxList m_validatorRegistryList;
|
private:
|
||||||
wxPropertyValidator* m_currentValidator;
|
DECLARE_DYNAMIC_CLASS(wxPropertyView)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxPropertyValidator: public wxEvtHandler
|
class WXDLLEXPORT wxPropertyValidator: public wxEvtHandler
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPropertyValidator)
|
public:
|
||||||
public:
|
wxPropertyValidator(long flags = 0);
|
||||||
wxPropertyValidator(long flags = 0);
|
~wxPropertyValidator();
|
||||||
~wxPropertyValidator(void);
|
|
||||||
|
|
||||||
inline long GetFlags(void) const { return m_validatorFlags; }
|
inline long GetFlags() const { return m_validatorFlags; }
|
||||||
inline void SetValidatorProperty(wxProperty *prop) { m_validatorProperty = prop; }
|
inline void SetValidatorProperty(wxProperty *prop) { m_validatorProperty = prop; }
|
||||||
inline wxProperty *GetValidatorProperty(void) const { return m_validatorProperty; }
|
inline wxProperty *GetValidatorProperty(void) const { return m_validatorProperty; }
|
||||||
|
|
||||||
virtual bool StringToFloat (wxChar *s, float *number);
|
virtual bool StringToFloat (wxChar *s, float *number);
|
||||||
virtual bool StringToDouble (wxChar *s, double *number);
|
virtual bool StringToDouble (wxChar *s, double *number);
|
||||||
virtual bool StringToInt (wxChar *s, int *number);
|
virtual bool StringToInt (wxChar *s, int *number);
|
||||||
virtual bool StringToLong (wxChar *s, long *number);
|
virtual bool StringToLong (wxChar *s, long *number);
|
||||||
virtual wxChar *FloatToString (float number);
|
virtual wxChar *FloatToString (float number);
|
||||||
virtual wxChar *DoubleToString (double number);
|
virtual wxChar *DoubleToString (double number);
|
||||||
virtual wxChar *IntToString (int number);
|
virtual wxChar *IntToString (int number);
|
||||||
virtual wxChar *LongToString (long number);
|
virtual wxChar *LongToString (long number);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
long m_validatorFlags;
|
long m_validatorFlags;
|
||||||
wxProperty* m_validatorProperty;
|
wxProperty* m_validatorProperty;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxPropertyValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -160,14 +161,16 @@ class WXDLLEXPORT wxPropertyValidator: public wxEvtHandler
|
|||||||
|
|
||||||
class WXDLLEXPORT wxPropertyValidatorRegistry: public wxHashTable
|
class WXDLLEXPORT wxPropertyValidatorRegistry: public wxHashTable
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPropertyValidatorRegistry)
|
public:
|
||||||
public:
|
wxPropertyValidatorRegistry();
|
||||||
wxPropertyValidatorRegistry(void);
|
~wxPropertyValidatorRegistry();
|
||||||
~wxPropertyValidatorRegistry(void);
|
|
||||||
|
|
||||||
virtual void RegisterValidator(const wxString& roleName, wxPropertyValidator *validator);
|
virtual void RegisterValidator(const wxString& roleName, wxPropertyValidator *validator);
|
||||||
virtual wxPropertyValidator *GetValidator(const wxString& roleName);
|
virtual wxPropertyValidator *GetValidator(const wxString& roleName);
|
||||||
void ClearRegistry(void);
|
void ClearRegistry();
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxPropertyValidatorRegistry)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -78,8 +78,7 @@
|
|||||||
// Mediates between a physical panel and the property sheet
|
// Mediates between a physical panel and the property sheet
|
||||||
class WXDLLEXPORT wxPropertyListView: public wxPropertyView
|
class WXDLLEXPORT wxPropertyListView: public wxPropertyView
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPropertyListView)
|
public:
|
||||||
public:
|
|
||||||
wxPropertyListView(wxPanel *propPanel = NULL, long flags = wxPROP_BUTTON_DEFAULT);
|
wxPropertyListView(wxPanel *propPanel = NULL, long flags = wxPROP_BUTTON_DEFAULT);
|
||||||
~wxPropertyListView(void);
|
~wxPropertyListView(void);
|
||||||
|
|
||||||
@@ -186,10 +185,12 @@ public:
|
|||||||
wxButton* m_windowCancelButton;
|
wxButton* m_windowCancelButton;
|
||||||
wxButton* m_windowHelpButton;
|
wxButton* m_windowHelpButton;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
private:
|
private:
|
||||||
virtual void ShowView(wxPropertySheet *propertySheet, wxWindow *window)
|
DECLARE_DYNAMIC_CLASS(wxPropertyListView)
|
||||||
{ wxPropertyView::ShowView(propertySheet, window); };
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
|
virtual void ShowView(wxPropertySheet *propertySheet, wxWindow *window)
|
||||||
|
{ wxPropertyView::ShowView(propertySheet, window); };
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxPropertyTextEdit: public wxTextCtrl
|
class WXDLLEXPORT wxPropertyTextEdit: public wxTextCtrl
|
||||||
@@ -202,13 +203,14 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = _T("text"));
|
const wxString& name = wxT("text"));
|
||||||
|
|
||||||
void OnSetFocus();
|
void OnSetFocus();
|
||||||
void OnKillFocus();
|
void OnKillFocus();
|
||||||
|
|
||||||
wxPropertyListView* m_view;
|
wxPropertyListView* m_view;
|
||||||
|
|
||||||
|
private:
|
||||||
DECLARE_CLASS(wxPropertyTextEdit)
|
DECLARE_CLASS(wxPropertyTextEdit)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -220,11 +222,9 @@ public:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator
|
class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxPropertyListValidator)
|
public:
|
||||||
protected:
|
|
||||||
public:
|
|
||||||
wxPropertyListValidator(long flags = wxPROP_ALLOW_TEXT_EDITING): wxPropertyValidator(flags) { }
|
wxPropertyListValidator(long flags = wxPROP_ALLOW_TEXT_EDITING): wxPropertyValidator(flags) { }
|
||||||
~wxPropertyListValidator(void) {}
|
~wxPropertyListValidator() {}
|
||||||
|
|
||||||
// Called when the property is selected or deselected: typically displays the value
|
// Called when the property is selected or deselected: typically displays the value
|
||||||
// in the edit control (having chosen a suitable control to display: (non)editable text or listbox)
|
// in the edit control (having chosen a suitable control to display: (non)editable text or listbox)
|
||||||
@@ -274,6 +274,9 @@ class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator
|
|||||||
virtual bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
virtual bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
virtual bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
virtual bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxPropertyListValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -289,7 +292,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
long style = wxDEFAULT_DIALOG_STYLE,
|
||||||
const wxString& name = _T("dialogBox"));
|
const wxString& name = wxT("dialogBox"));
|
||||||
|
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
void OnDefaultAction(wxControl *item);
|
void OnDefaultAction(wxControl *item);
|
||||||
@@ -301,6 +304,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxPropertyListView* m_view;
|
wxPropertyListView* m_view;
|
||||||
|
|
||||||
|
private:
|
||||||
DECLARE_CLASS(wxPropertyListDialog)
|
DECLARE_CLASS(wxPropertyListDialog)
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
@@ -317,7 +321,7 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString& name = _T("panel"))
|
const wxString& name = wxT("panel"))
|
||||||
: wxPanel(parent, -1, pos, size, style, name)
|
: wxPanel(parent, -1, pos, size, style, name)
|
||||||
{
|
{
|
||||||
m_view = v;
|
m_view = v;
|
||||||
@@ -337,6 +341,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
wxPropertyListView* m_view;
|
wxPropertyListView* m_view;
|
||||||
|
|
||||||
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
DECLARE_CLASS(wxPropertyListPanel)
|
DECLARE_CLASS(wxPropertyListPanel)
|
||||||
};
|
};
|
||||||
@@ -372,6 +377,7 @@ private:
|
|||||||
wxPropertyListView* m_view;
|
wxPropertyListView* m_view;
|
||||||
wxPropertyListPanel* m_propertyPanel;
|
wxPropertyListPanel* m_propertyPanel;
|
||||||
|
|
||||||
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
DECLARE_CLASS(wxPropertyListFrame)
|
DECLARE_CLASS(wxPropertyListFrame)
|
||||||
};
|
};
|
||||||
@@ -382,41 +388,40 @@ private:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxRealListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxRealListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxRealListValidator)
|
public:
|
||||||
public:
|
// 0.0, 0.0 means no range
|
||||||
// 0.0, 0.0 means no range
|
wxRealListValidator(float min = 0.0, float max = 0.0, long flags = wxPROP_ALLOW_TEXT_EDITING):wxPropertyListValidator(flags)
|
||||||
wxRealListValidator(float min = 0.0, float max = 0.0, long flags = wxPROP_ALLOW_TEXT_EDITING):wxPropertyListValidator(flags)
|
{ m_realMin = min; m_realMax = max; }
|
||||||
{
|
~wxRealListValidator() {}
|
||||||
m_realMin = min; m_realMax = max;
|
|
||||||
}
|
|
||||||
~wxRealListValidator(void) {}
|
|
||||||
|
|
||||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost.
|
// Called when TICK is pressed or focus is lost.
|
||||||
// Return FALSE if value didn't check out; signal to restore old value.
|
// Return FALSE if value didn't check out; signal to restore old value.
|
||||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost or view wants to update
|
// Called when TICK is pressed or focus is lost or view wants to update
|
||||||
// the property list.
|
// the property list.
|
||||||
// Does the transfer from the property editing area to the property itself
|
// Does the transfer from the property editing area to the property itself
|
||||||
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
float m_realMin;
|
float m_realMin;
|
||||||
float m_realMax;
|
float m_realMax;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxRealListValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxIntegerListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxIntegerListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxIntegerListValidator)
|
public:
|
||||||
public:
|
|
||||||
// 0, 0 means no range
|
// 0, 0 means no range
|
||||||
wxIntegerListValidator(long min = 0, long max = 0, long flags = wxPROP_ALLOW_TEXT_EDITING):wxPropertyListValidator(flags)
|
wxIntegerListValidator(long min = 0, long max = 0, long flags = wxPROP_ALLOW_TEXT_EDITING):wxPropertyListValidator(flags)
|
||||||
{
|
{
|
||||||
m_integerMin = min; m_integerMax = max;
|
m_integerMin = min; m_integerMax = max;
|
||||||
}
|
}
|
||||||
~wxIntegerListValidator(void) {}
|
~wxIntegerListValidator() {}
|
||||||
|
|
||||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
@@ -429,156 +434,158 @@ class WXDLLEXPORT wxIntegerListValidator: public wxPropertyListValidator
|
|||||||
// Does the transfer from the property editing area to the property itself
|
// Does the transfer from the property editing area to the property itself
|
||||||
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
long m_integerMin;
|
long m_integerMin;
|
||||||
long m_integerMax;
|
long m_integerMax;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxIntegerListValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxBoolListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxBoolListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxBoolListValidator)
|
public:
|
||||||
protected:
|
wxBoolListValidator(long flags = 0):wxPropertyListValidator(flags) {}
|
||||||
public:
|
~wxBoolListValidator() {}
|
||||||
wxBoolListValidator(long flags = 0):wxPropertyListValidator(flags)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
~wxBoolListValidator(void) {}
|
|
||||||
|
|
||||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
bool OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
bool OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost.
|
// Called when TICK is pressed or focus is lost.
|
||||||
// Return FALSE if value didn't check out; signal to restore old value.
|
// Return FALSE if value didn't check out; signal to restore old value.
|
||||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost or view wants to update
|
// Called when TICK is pressed or focus is lost or view wants to update
|
||||||
// the property list.
|
// the property list.
|
||||||
// Does the transfer from the property editing area to the property itself
|
// Does the transfer from the property editing area to the property itself
|
||||||
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when the property is double clicked. Extra functionality can be provided,
|
// Called when the property is double clicked. Extra functionality can be provided,
|
||||||
// cycling through possible values.
|
// cycling through possible values.
|
||||||
virtual bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
virtual bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxBoolListValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxStringListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxStringListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxStringListValidator)
|
public:
|
||||||
public:
|
|
||||||
wxStringListValidator(wxStringList *list = NULL, long flags = 0);
|
wxStringListValidator(wxStringList *list = NULL, long flags = 0);
|
||||||
|
|
||||||
~wxStringListValidator(void)
|
~wxStringListValidator()
|
||||||
{
|
{
|
||||||
if (m_strings)
|
if (m_strings)
|
||||||
delete m_strings;
|
delete m_strings;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
bool OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnPrepareDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
bool OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnClearDetailControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost.
|
// Called when TICK is pressed or focus is lost.
|
||||||
// Return FALSE if value didn't check out; signal to restore old value.
|
// Return FALSE if value didn't check out; signal to restore old value.
|
||||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost or view wants to update
|
// Called when TICK is pressed or focus is lost or view wants to update
|
||||||
// the property list.
|
// the property list.
|
||||||
// Does the transfer from the property editing area to the property itself
|
// Does the transfer from the property editing area to the property itself
|
||||||
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when the property is double clicked. Extra functionality can be provided,
|
// Called when the property is double clicked. Extra functionality can be provided,
|
||||||
// cycling through possible values.
|
// cycling through possible values.
|
||||||
bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxStringList* m_strings;
|
wxStringList* m_strings;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxStringListValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxFilenameListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxFilenameListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxFilenameListValidator)
|
public:
|
||||||
public:
|
wxFilenameListValidator(wxString message = wxT("Select a file"), wxString wildcard = wxALL_FILES_PATTERN, long flags = 0);
|
||||||
wxFilenameListValidator(wxString message = "Select a file", wxString wildcard = wxALL_FILES_PATTERN, long flags = 0);
|
~wxFilenameListValidator();
|
||||||
|
|
||||||
~wxFilenameListValidator(void);
|
// Called when TICK is pressed or focus is lost.
|
||||||
|
// Return FALSE if value didn't check out; signal to restore old value.
|
||||||
|
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost.
|
// Called when TICK is pressed or focus is lost or view wants to update
|
||||||
// Return FALSE if value didn't check out; signal to restore old value.
|
// the property list.
|
||||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
// Does the transferance from the property editing area to the property itself
|
||||||
|
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost or view wants to update
|
bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
// the property list.
|
|
||||||
// Does the transferance from the property editing area to the property itself
|
|
||||||
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
|
||||||
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
|
||||||
|
|
||||||
bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
// Called when the edit (...) button is pressed.
|
||||||
|
void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when the edit (...) button is pressed.
|
protected:
|
||||||
void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
wxString m_filenameWildCard;
|
||||||
|
wxString m_filenameMessage;
|
||||||
protected:
|
|
||||||
wxString m_filenameWildCard;
|
|
||||||
wxString m_filenameMessage;
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxFilenameListValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxColourListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxColourListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxColourListValidator)
|
public:
|
||||||
protected:
|
wxColourListValidator(long flags = 0);
|
||||||
public:
|
~wxColourListValidator();
|
||||||
wxColourListValidator(long flags = 0);
|
|
||||||
|
|
||||||
~wxColourListValidator(void);
|
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
|
||||||
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
|
||||||
|
|
||||||
bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
// Called when the edit (...) button is pressed.
|
||||||
|
void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
// Called when the edit (...) button is pressed.
|
|
||||||
void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxColourListValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
class WXDLLEXPORT wxListOfStringsListValidator: public wxPropertyListValidator
|
class WXDLLEXPORT wxListOfStringsListValidator: public wxPropertyListValidator
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListOfStringsListValidator)
|
public:
|
||||||
protected:
|
wxListOfStringsListValidator(long flags = 0);
|
||||||
public:
|
~wxListOfStringsListValidator() {}
|
||||||
wxListOfStringsListValidator(long flags = 0);
|
|
||||||
|
|
||||||
~wxListOfStringsListValidator(void)
|
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OnPrepareControls(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
// Called when TICK is pressed or focus is lost.
|
||||||
|
// Return FALSE if value didn't check out; signal to restore old value.
|
||||||
|
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost.
|
// Called when TICK is pressed or focus is lost or view wants to update
|
||||||
// Return FALSE if value didn't check out; signal to restore old value.
|
// the property list.
|
||||||
bool OnCheckValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
// Does the transfer from the property editing area to the property itself
|
||||||
|
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
|
|
||||||
// Called when TICK is pressed or focus is lost or view wants to update
|
// Called when the property is double clicked.
|
||||||
// the property list.
|
bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
// Does the transfer from the property editing area to the property itself
|
|
||||||
bool OnRetrieveValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
|
||||||
bool OnDisplayValue(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
|
||||||
|
|
||||||
// Called when the property is double clicked.
|
bool EditStringList(wxWindow *parent, wxStringList *stringList, const wxChar *title = wxT("String List Editor"));
|
||||||
bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
|
||||||
|
|
||||||
bool EditStringList(wxWindow *parent, wxStringList *stringList, const wxChar *title = wxT("String List Editor"));
|
// Called when the edit (...) button is pressed.
|
||||||
|
void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
||||||
// Called when the edit (...) button is pressed.
|
|
||||||
void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow);
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListOfStringsListValidator)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -562,7 +562,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
optInd = m_data->FindOptionByLongName(name);
|
optInd = m_data->FindOptionByLongName(name);
|
||||||
if ( optInd == wxNOT_FOUND )
|
if ( optInd == wxNOT_FOUND )
|
||||||
{
|
{
|
||||||
errorMsg << wxString::Format(_("Unknown long option '%s'"), name.c_str()) << "\n";
|
errorMsg << wxString::Format(_("Unknown long option '%s'"), name.c_str()) << wxT("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -571,7 +571,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
|
|
||||||
// Print the argument including leading "--"
|
// Print the argument including leading "--"
|
||||||
name.Prepend( wxT("--") );
|
name.Prepend( wxT("--") );
|
||||||
errorMsg << wxString::Format(_("Unknown option '%s'"), name.c_str()) << "\n";
|
errorMsg << wxString::Format(_("Unknown option '%s'"), name.c_str()) << wxT("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -592,7 +592,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
{
|
{
|
||||||
// we couldn't find a valid option name in the
|
// we couldn't find a valid option name in the
|
||||||
// beginning of this string
|
// beginning of this string
|
||||||
errorMsg << wxString::Format(_("Unknown option '%s'"), name.c_str()) << "\n";
|
errorMsg << wxString::Format(_("Unknown option '%s'"), name.c_str()) << wxT("\n");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -664,7 +664,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
|
|
||||||
if ( *p++ != _T('=') )
|
if ( *p++ != _T('=') )
|
||||||
{
|
{
|
||||||
errorMsg << wxString::Format(_("Option '%s' requires a value, '=' expected."), name.c_str()) << "\n";
|
errorMsg << wxString::Format(_("Option '%s' requires a value, '=' expected."), name.c_str()) << wxT("\n");
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -685,7 +685,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
{
|
{
|
||||||
// ... but there is none
|
// ... but there is none
|
||||||
errorMsg << wxString::Format(_("Option '%s' requires a value."),
|
errorMsg << wxString::Format(_("Option '%s' requires a value."),
|
||||||
name.c_str()) << "\n";
|
name.c_str()) << wxT("\n");
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -702,7 +702,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
if ( opt.flags & wxCMD_LINE_NEEDS_SEPARATOR )
|
if ( opt.flags & wxCMD_LINE_NEEDS_SEPARATOR )
|
||||||
{
|
{
|
||||||
errorMsg << wxString::Format(_("Separator expected after the option '%s'."),
|
errorMsg << wxString::Format(_("Separator expected after the option '%s'."),
|
||||||
name.c_str()) << "\n";
|
name.c_str()) << wxT("\n");
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -732,7 +732,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMsg << wxString::Format(_("'%s' is not a correct numeric value for option '%s'."),
|
errorMsg << wxString::Format(_("'%s' is not a correct numeric value for option '%s'."),
|
||||||
value.c_str(), name.c_str()) << "\n";
|
value.c_str(), name.c_str()) << wxT("\n");
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -746,7 +746,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
if ( !res || *res )
|
if ( !res || *res )
|
||||||
{
|
{
|
||||||
errorMsg << wxString::Format(_("Option '%s': '%s' cannot be converted to a date."),
|
errorMsg << wxString::Format(_("Option '%s': '%s' cannot be converted to a date."),
|
||||||
name.c_str(), value.c_str()) << "\n";
|
name.c_str(), value.c_str()) << wxT("\n");
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -786,7 +786,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMsg << wxString::Format(_("Unexpected parameter '%s'"), arg.c_str()) << "\n";
|
errorMsg << wxString::Format(_("Unexpected parameter '%s'"), arg.c_str()) << wxT("\n");
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -823,7 +823,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
errorMsg << wxString::Format(_("The value for the option '%s' must be specified."),
|
errorMsg << wxString::Format(_("The value for the option '%s' must be specified."),
|
||||||
optName.c_str()) << "\n";
|
optName.c_str()) << wxT("\n");
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
@@ -844,7 +844,7 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
if ( !(param.flags & wxCMD_LINE_PARAM_OPTIONAL) )
|
if ( !(param.flags & wxCMD_LINE_PARAM_OPTIONAL) )
|
||||||
{
|
{
|
||||||
errorMsg << wxString::Format(_("The required parameter '%s' was not specified."),
|
errorMsg << wxString::Format(_("The required parameter '%s' was not specified."),
|
||||||
param.description.c_str()) << "\n";
|
param.description.c_str()) << wxT("\n");
|
||||||
|
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -247,7 +247,7 @@ wxPrintData::wxPrintData()
|
|||||||
m_printCollate = FALSE;
|
m_printCollate = FALSE;
|
||||||
|
|
||||||
// New, 24/3/99
|
// New, 24/3/99
|
||||||
m_printerName = "";
|
m_printerName = wxT("");
|
||||||
m_colour = TRUE;
|
m_colour = TRUE;
|
||||||
m_duplexMode = wxDUPLEX_SIMPLEX;
|
m_duplexMode = wxDUPLEX_SIMPLEX;
|
||||||
m_printQuality = wxPRINT_QUALITY_HIGH;
|
m_printQuality = wxPRINT_QUALITY_HIGH;
|
||||||
|
@@ -113,14 +113,14 @@ wxString wxDataInputStream::ReadString()
|
|||||||
char *tmp = new char[len + 1];
|
char *tmp = new char[len + 1];
|
||||||
m_input->Read(tmp, len);
|
m_input->Read(tmp, len);
|
||||||
tmp[len] = 0;
|
tmp[len] = 0;
|
||||||
wxString s(tmp, m_conv);
|
wxString ret( (const wxChar*) m_conv.cMB2WX(tmp) );
|
||||||
delete[] tmp;
|
delete[] tmp;
|
||||||
#else
|
#else
|
||||||
wxString s;
|
wxString ret;
|
||||||
m_input->Read(s.GetWriteBuf(len), len);
|
m_input->Read(s.GetWriteBuf(len), len);
|
||||||
s.UngetWriteBuf();
|
ret.UngetWriteBuf();
|
||||||
#endif
|
#endif
|
||||||
return s;
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
@@ -262,7 +262,7 @@ bool wxDocument::SaveAs()
|
|||||||
|
|
||||||
if (ext.IsEmpty() || ext == wxT(""))
|
if (ext.IsEmpty() || ext == wxT(""))
|
||||||
{
|
{
|
||||||
fileName += ".";
|
fileName += wxT(".");
|
||||||
fileName += docTemplate->GetDefaultExtension();
|
fileName += docTemplate->GetDefaultExtension();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,10 +295,10 @@ bool wxDocument::OnSaveDocument(const wxString& file)
|
|||||||
msgTitle = wxString(_("File error"));
|
msgTitle = wxString(_("File error"));
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
wxSTD ofstream store(wxString(file.fn_str()).mb_str());
|
wxSTD ofstream store(wxString(file.fn_str()).mb_str()); // ?????
|
||||||
if (store.fail() || store.bad())
|
if (store.fail() || store.bad())
|
||||||
#else
|
#else
|
||||||
wxFileOutputStream store(wxString(file.fn_str()));
|
wxFileOutputStream store( file );
|
||||||
if (store.LastError() != wxSTREAM_NOERROR)
|
if (store.LastError() != wxSTREAM_NOERROR)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -332,10 +332,10 @@ bool wxDocument::OnOpenDocument(const wxString& file)
|
|||||||
msgTitle = wxString(_("File error"));
|
msgTitle = wxString(_("File error"));
|
||||||
|
|
||||||
#if wxUSE_STD_IOSTREAM
|
#if wxUSE_STD_IOSTREAM
|
||||||
wxSTD ifstream store(wxString(file.fn_str()).mb_str());
|
wxSTD ifstream store(wxString(file.fn_str()).mb_str()); // ????
|
||||||
if (store.fail() || store.bad())
|
if (store.fail() || store.bad())
|
||||||
#else
|
#else
|
||||||
wxFileInputStream store(wxString(file.fn_str()));
|
wxFileInputStream store( file );
|
||||||
if (store.LastError() != wxSTREAM_NOERROR)
|
if (store.LastError() != wxSTREAM_NOERROR)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -839,12 +839,12 @@ void wxDocManager::OnFileCloseAll(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void wxDocManager::OnFileNew(wxCommandEvent& WXUNUSED(event))
|
void wxDocManager::OnFileNew(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
CreateDocument(wxString(""), wxDOC_NEW);
|
CreateDocument( wxT(""), wxDOC_NEW );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDocManager::OnFileOpen(wxCommandEvent& WXUNUSED(event))
|
void wxDocManager::OnFileOpen(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if ( !CreateDocument(wxString(""), 0) )
|
if ( !CreateDocument( wxT(""), 0) )
|
||||||
{
|
{
|
||||||
OnOpenFileFailure();
|
OnOpenFileFailure();
|
||||||
}
|
}
|
||||||
|
@@ -474,7 +474,7 @@ wxFileConfig::wxFileConfig(wxInputStream &inStream)
|
|||||||
SetStyle(GetStyle() | wxCONFIG_USE_LOCAL_FILE);
|
SetStyle(GetStyle() | wxCONFIG_USE_LOCAL_FILE);
|
||||||
|
|
||||||
m_pCurrentGroup =
|
m_pCurrentGroup =
|
||||||
m_pRootGroup = new wxFileConfigGroup(NULL, "", this);
|
m_pRootGroup = new wxFileConfigGroup(NULL, wxT(""), this);
|
||||||
|
|
||||||
m_linesHead =
|
m_linesHead =
|
||||||
m_linesTail = NULL;
|
m_linesTail = NULL;
|
||||||
|
@@ -1070,7 +1070,7 @@ bool
|
|||||||
wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& file3)
|
wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& file3)
|
||||||
{
|
{
|
||||||
wxString outfile;
|
wxString outfile;
|
||||||
if ( !wxGetTempFileName("cat", outfile) )
|
if ( !wxGetTempFileName( wxT("cat"), outfile) )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
FILE *fp1 = (FILE *) NULL;
|
FILE *fp1 = (FILE *) NULL;
|
||||||
|
@@ -179,8 +179,8 @@ wxString wxZipFSHandler::DoFind()
|
|||||||
while (match == wxEmptyString)
|
while (match == wxEmptyString)
|
||||||
{
|
{
|
||||||
unzGetCurrentFileInfo((unzFile)m_Archive, NULL, namebuf, 1024, NULL, 0, NULL, 0);
|
unzGetCurrentFileInfo((unzFile)m_Archive, NULL, namebuf, 1024, NULL, 0, NULL, 0);
|
||||||
for (c = namebuf; *c; c++) if (*c == wxT('\\')) *c = wxT('/');
|
for (c = namebuf; *c; c++) if (*c == '\\') *c = '/';
|
||||||
namestr = namebuf;
|
namestr = wxString::FromAscii( namebuf ); // TODO what encoding does ZIP use?
|
||||||
|
|
||||||
if (m_AllowDirs)
|
if (m_AllowDirs)
|
||||||
{
|
{
|
||||||
|
@@ -111,8 +111,8 @@ void
|
|||||||
PNGLINKAGEMODE wx_png_error(png_structp png_ptr, png_const_charp message)
|
PNGLINKAGEMODE wx_png_error(png_structp png_ptr, png_const_charp message)
|
||||||
{
|
{
|
||||||
wxPNGInfoStruct *info = WX_PNG_INFO(png_ptr);
|
wxPNGInfoStruct *info = WX_PNG_INFO(png_ptr);
|
||||||
if ( info->verbose )
|
if (info->verbose)
|
||||||
wxLogError(wxString(message));
|
wxLogError( wxString::FromAscii(message) );
|
||||||
|
|
||||||
#ifdef USE_FAR_KEYWORD
|
#ifdef USE_FAR_KEYWORD
|
||||||
{
|
{
|
||||||
@@ -129,8 +129,8 @@ void
|
|||||||
PNGLINKAGEMODE wx_png_warning(png_structp png_ptr, png_const_charp message)
|
PNGLINKAGEMODE wx_png_warning(png_structp png_ptr, png_const_charp message)
|
||||||
{
|
{
|
||||||
wxPNGInfoStruct *info = WX_PNG_INFO(png_ptr);
|
wxPNGInfoStruct *info = WX_PNG_INFO(png_ptr);
|
||||||
if ( info->verbose )
|
if (info->verbose)
|
||||||
wxLogWarning(wxString(message));
|
wxLogWarning( wxString::FromAscii(message) );
|
||||||
}
|
}
|
||||||
|
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
@@ -39,12 +39,12 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNMHandler,wxImageHandler)
|
|||||||
|
|
||||||
void Skip_Comment(wxInputStream &stream)
|
void Skip_Comment(wxInputStream &stream)
|
||||||
{
|
{
|
||||||
wxTextInputStream text_stream(stream);
|
wxTextInputStream text_stream(stream);
|
||||||
|
|
||||||
if (stream.Peek()==wxT('#'))
|
if (stream.Peek()==wxT('#'))
|
||||||
{
|
{
|
||||||
text_stream.ReadLine();
|
text_stream.ReadLine();
|
||||||
Skip_Comment(stream);
|
Skip_Comment(stream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ bool wxPNMHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool WXUNUS
|
|||||||
//text_stream << "P6" << endl
|
//text_stream << "P6" << endl
|
||||||
//<< image->GetWidth() << " " << image->GetHeight() << endl
|
//<< image->GetWidth() << " " << image->GetHeight() << endl
|
||||||
//<< "255" << endl;
|
//<< "255" << endl;
|
||||||
text_stream << "P6\n" << image->GetWidth() << " " << image->GetHeight() << "\n255\n";
|
text_stream << wxT("P6\n") << image->GetWidth() << wxT(" ") << image->GetHeight() << wxT("\n255\n");
|
||||||
stream.Write(image->GetData(),3*image->GetWidth()*image->GetHeight());
|
stream.Write(image->GetData(),3*image->GetWidth()*image->GetHeight());
|
||||||
|
|
||||||
return (stream.LastError()==wxStream_NOERROR);
|
return (stream.LastError()==wxStream_NOERROR);
|
||||||
|
@@ -506,7 +506,7 @@ wxString wxMsgCatalogFile::GetCharset() const
|
|||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString header(StringAtOfs(m_pTransTable, 0));
|
wxString header = wxString::FromAscii( StringAtOfs(m_pTransTable, 0));
|
||||||
wxString charset;
|
wxString charset;
|
||||||
int pos = header.Find(wxT("Content-Type: text/plain; charset="));
|
int pos = header.Find(wxT("Content-Type: text/plain; charset="));
|
||||||
if ( pos == wxNOT_FOUND )
|
if ( pos == wxNOT_FOUND )
|
||||||
|
@@ -1699,9 +1699,9 @@ bool wxPostScriptDC::StartDoc( const wxString& message )
|
|||||||
{
|
{
|
||||||
wxCHECK_MSG( m_ok, FALSE, wxT("invalid postscript dc") );
|
wxCHECK_MSG( m_ok, FALSE, wxT("invalid postscript dc") );
|
||||||
|
|
||||||
if (m_printData.GetFilename() == "")
|
if (m_printData.GetFilename() == wxT(""))
|
||||||
{
|
{
|
||||||
wxString filename = wxGetTempFileName("ps");
|
wxString filename = wxGetTempFileName( wxT("ps") );
|
||||||
m_printData.SetFilename(filename);
|
m_printData.SetFilename(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -498,13 +498,13 @@ wxString wxFileData::GetFullName() const
|
|||||||
wxString wxFileData::GetHint() const
|
wxString wxFileData::GetHint() const
|
||||||
{
|
{
|
||||||
wxString s = m_fileName;
|
wxString s = m_fileName;
|
||||||
s += " ";
|
s += wxT(" ");
|
||||||
if (m_isDir) s += _("<DIR> ");
|
if (m_isDir) s += wxT("<DIR> ");
|
||||||
else if (m_isLink) s += _("<LINK> ");
|
else if (m_isLink) s += wxT("<LINK> ");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s += LongToString( m_size );
|
s += LongToString( m_size );
|
||||||
s += _(" bytes ");
|
s += wxT(" bytes ");
|
||||||
}
|
}
|
||||||
s += IntToString( m_day );
|
s += IntToString( m_day );
|
||||||
s += wxT(".");
|
s += wxT(".");
|
||||||
|
@@ -47,9 +47,9 @@
|
|||||||
IMPLEMENT_CLASS(wxExtHelpController, wxHTMLHelpControllerBase)
|
IMPLEMENT_CLASS(wxExtHelpController, wxHTMLHelpControllerBase)
|
||||||
|
|
||||||
/// Name of environment variable to set help browser.
|
/// Name of environment variable to set help browser.
|
||||||
#define WXEXTHELP_ENVVAR_BROWSER "WX_HELPBROWSER"
|
#define WXEXTHELP_ENVVAR_BROWSER wxT("WX_HELPBROWSER")
|
||||||
/// Is browser a netscape browser?
|
/// Is browser a netscape browser?
|
||||||
#define WXEXTHELP_ENVVAR_BROWSERISNETSCAPE "WX_HELPBROWSER_NS"
|
#define WXEXTHELP_ENVVAR_BROWSERISNETSCAPE wxT("WX_HELPBROWSER_NS")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This class implements help via an external browser.
|
This class implements help via an external browser.
|
||||||
@@ -62,18 +62,17 @@ wxExtHelpController::wxExtHelpController(void)
|
|||||||
m_BrowserName = WXEXTHELP_DEFAULTBROWSER;
|
m_BrowserName = WXEXTHELP_DEFAULTBROWSER;
|
||||||
m_BrowserIsNetscape = WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE;
|
m_BrowserIsNetscape = WXEXTHELP_DEFAULTBROWSER_IS_NETSCAPE;
|
||||||
|
|
||||||
char *browser = getenv(WXEXTHELP_ENVVAR_BROWSER);
|
wxChar *browser = wxGetenv(WXEXTHELP_ENVVAR_BROWSER);
|
||||||
if(browser)
|
if(browser)
|
||||||
{
|
{
|
||||||
m_BrowserName = browser;
|
m_BrowserName = browser;
|
||||||
browser = getenv(WXEXTHELP_ENVVAR_BROWSERISNETSCAPE);
|
browser = wxGetenv(WXEXTHELP_ENVVAR_BROWSERISNETSCAPE);
|
||||||
m_BrowserIsNetscape = browser && (atoi(browser) != 0);
|
m_BrowserIsNetscape = browser && (wxAtoi(browser) != 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void wxExtHelpController::SetBrowser(wxString const & browsername, bool isNetscape)
|
||||||
wxExtHelpController::SetBrowser(wxString const & browsername, bool isNetscape)
|
|
||||||
{
|
{
|
||||||
m_BrowserName = browsername;
|
m_BrowserName = browsername;
|
||||||
m_BrowserIsNetscape = isNetscape;
|
m_BrowserIsNetscape = isNetscape;
|
||||||
|
@@ -195,15 +195,15 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile)
|
|||||||
break; // error
|
break; // error
|
||||||
for(i=0; isdigit(buffer[i])||isspace(buffer[i])||buffer[i]=='-'; i++)
|
for(i=0; isdigit(buffer[i])||isspace(buffer[i])||buffer[i]=='-'; i++)
|
||||||
; // find begin of URL
|
; // find begin of URL
|
||||||
url = "";
|
url = wxT("");
|
||||||
while(buffer[i] && ! isspace(buffer[i]) && buffer[i] !=
|
while(buffer[i] && ! isspace(buffer[i]) && buffer[i] !=
|
||||||
WXEXTHELP_COMMENTCHAR)
|
WXEXTHELP_COMMENTCHAR)
|
||||||
url << buffer[i++];
|
url << (wxChar) buffer[i++];
|
||||||
while(buffer[i] && buffer[i] != WXEXTHELP_COMMENTCHAR)
|
while(buffer[i] && buffer[i] != WXEXTHELP_COMMENTCHAR)
|
||||||
i++;
|
i++;
|
||||||
doc = "";
|
doc = wxT("");
|
||||||
if(buffer[i])
|
if(buffer[i])
|
||||||
doc = (buffer + i + 1); // skip the comment character
|
doc = wxString::FromAscii( (buffer + i + 1) ); // skip the comment character
|
||||||
m_MapList->Append(new wxExtHelpMapEntry(id,url,doc));
|
m_MapList->Append(new wxExtHelpMapEntry(id,url,doc));
|
||||||
m_NumOfEntries++;
|
m_NumOfEntries++;
|
||||||
}
|
}
|
||||||
@@ -312,7 +312,7 @@ wxHTMLHelpControllerBase::KeywordSearch(const wxString& k)
|
|||||||
// choices[idx] = (**i).doc.Contains((**i).doc.Before(WXEXTHELP_COMMENTCHAR));
|
// choices[idx] = (**i).doc.Contains((**i).doc.Before(WXEXTHELP_COMMENTCHAR));
|
||||||
//if(choices[idx].IsEmpty()) // didn't contain the ';'
|
//if(choices[idx].IsEmpty()) // didn't contain the ';'
|
||||||
// choices[idx] = (**i).doc;
|
// choices[idx] = (**i).doc;
|
||||||
choices[idx] = "";
|
choices[idx] = wxT("");
|
||||||
for(j=0;entry->doc.c_str()[j]
|
for(j=0;entry->doc.c_str()[j]
|
||||||
&& entry->doc.c_str()[j] != WXEXTHELP_COMMENTCHAR; j++)
|
&& entry->doc.c_str()[j] != WXEXTHELP_COMMENTCHAR; j++)
|
||||||
choices[idx] << entry->doc.c_str()[j];
|
choices[idx] << entry->doc.c_str()[j];
|
||||||
|
@@ -466,7 +466,7 @@ public:
|
|||||||
const wxPoint &pos = wxDefaultPosition,
|
const wxPoint &pos = wxDefaultPosition,
|
||||||
const wxSize &size = wxDefaultSize,
|
const wxSize &size = wxDefaultSize,
|
||||||
long style = 0,
|
long style = 0,
|
||||||
const wxString &name = "wxlistctrlcolumntitles" );
|
const wxString &name = wxT("wxlistctrlcolumntitles") );
|
||||||
|
|
||||||
virtual ~wxListHeaderWindow();
|
virtual ~wxListHeaderWindow();
|
||||||
|
|
||||||
|
@@ -182,16 +182,16 @@ void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent))
|
|||||||
if (m_printDialogData.GetFromPage() != 0)
|
if (m_printDialogData.GetFromPage() != 0)
|
||||||
{
|
{
|
||||||
bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("From:") ), 0, wxCENTER|wxALL, 5 );
|
bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("From:") ), 0, wxCENTER|wxALL, 5 );
|
||||||
m_fromText = new wxTextCtrl(this, wxPRINTID_FROM, "", wxDefaultPosition, wxSize(40, -1));
|
m_fromText = new wxTextCtrl(this, wxPRINTID_FROM, wxT(""), wxDefaultPosition, wxSize(40, -1));
|
||||||
bottomsizer->Add( m_fromText, 1, wxCENTER|wxRIGHT, 10 );
|
bottomsizer->Add( m_fromText, 1, wxCENTER|wxRIGHT, 10 );
|
||||||
|
|
||||||
bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("To:") ), 0, wxCENTER|wxALL, 5);
|
bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("To:") ), 0, wxCENTER|wxALL, 5);
|
||||||
m_toText = new wxTextCtrl(this, wxPRINTID_TO, "", wxDefaultPosition, wxSize(40, -1));
|
m_toText = new wxTextCtrl(this, wxPRINTID_TO, wxT(""), wxDefaultPosition, wxSize(40, -1));
|
||||||
bottomsizer->Add( m_toText, 1, wxCENTER|wxRIGHT, 10 );
|
bottomsizer->Add( m_toText, 1, wxCENTER|wxRIGHT, 10 );
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Copies:") ), 0, wxCENTER|wxALL, 5 );
|
bottomsizer->Add( new wxStaticText(this, wxPRINTID_STATIC, _("Copies:") ), 0, wxCENTER|wxALL, 5 );
|
||||||
m_noCopiesText = new wxTextCtrl(this, wxPRINTID_COPIES, "", wxPoint(252, 130), wxSize(40, -1));
|
m_noCopiesText = new wxTextCtrl(this, wxPRINTID_COPIES, wxT(""), wxPoint(252, 130), wxSize(40, -1));
|
||||||
bottomsizer->Add( m_noCopiesText, 1, wxCENTER|wxRIGHT, 10 );
|
bottomsizer->Add( m_noCopiesText, 1, wxCENTER|wxRIGHT, 10 );
|
||||||
|
|
||||||
mainsizer->Add( bottomsizer, 0, wxTOP|wxLEFT|wxRIGHT, 12 );
|
mainsizer->Add( bottomsizer, 0, wxTOP|wxLEFT|wxRIGHT, 12 );
|
||||||
@@ -443,11 +443,11 @@ void wxGenericPrintSetupDialog::Init(wxPrintData* data)
|
|||||||
|
|
||||||
(void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer command:"), wxPoint(340, 30));
|
(void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer command:"), wxPoint(340, 30));
|
||||||
|
|
||||||
m_printerCommandText = new wxTextCtrl(this, wxPRINTID_COMMAND, "", wxPoint(360, 55), wxSize(150, -1));
|
m_printerCommandText = new wxTextCtrl(this, wxPRINTID_COMMAND, wxT(""), wxPoint(360, 55), wxSize(150, -1));
|
||||||
|
|
||||||
(void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer options:"), wxPoint(340, 110));
|
(void) new wxStaticText(this, wxPRINTID_STATIC, _("Printer options:"), wxPoint(340, 110));
|
||||||
|
|
||||||
m_printerOptionsText = new wxTextCtrl(this, wxPRINTID_OPTIONS, "", wxPoint(360, 135), wxSize(150, -1));
|
m_printerOptionsText = new wxTextCtrl(this, wxPRINTID_OPTIONS, wxT(""), wxPoint(360, 135), wxSize(150, -1));
|
||||||
|
|
||||||
wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(130, 200), wxSize(80, -1));
|
wxButton *okButton = new wxButton(this, wxID_OK, _("OK"), wxPoint(130, 200), wxSize(80, -1));
|
||||||
(void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(320, 200), wxSize(80, -1));
|
(void) new wxButton(this, wxID_CANCEL, _("Cancel"), wxPoint(320, 200), wxSize(80, -1));
|
||||||
@@ -504,7 +504,7 @@ bool wxGenericPrintSetupDialog::TransferDataFromWindow()
|
|||||||
if (m_paperTypeChoice)
|
if (m_paperTypeChoice)
|
||||||
{
|
{
|
||||||
wxString val(m_paperTypeChoice->GetStringSelection());
|
wxString val(m_paperTypeChoice->GetStringSelection());
|
||||||
if (!val.IsNull() && val != "")
|
if (!val.IsNull() && val != wxT(""))
|
||||||
m_printData.SetPaperId(wxThePrintPaperDatabase->ConvertNameToId(val));
|
m_printData.SetPaperId(wxThePrintPaperDatabase->ConvertNameToId(val));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -634,8 +634,8 @@ wxDialog(parent, -1, _("Page Setup"), wxPoint(0, 0), wxSize(600, 600), wxDIALOG_
|
|||||||
table->Add( column1, 0, wxALL | wxEXPAND, 5 );
|
table->Add( column1, 0, wxALL | wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer *column2 = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer *column2 = new wxBoxSizer( wxVERTICAL );
|
||||||
m_marginLeftText = new wxTextCtrl(this, wxPRINTID_LEFTMARGIN, "", wxDefaultPosition, wxSize(textWidth, -1));
|
m_marginLeftText = new wxTextCtrl(this, wxPRINTID_LEFTMARGIN, wxT(""), wxDefaultPosition, wxSize(textWidth, -1));
|
||||||
m_marginTopText = new wxTextCtrl(this, wxPRINTID_TOPMARGIN, "", wxDefaultPosition, wxSize(textWidth, -1));
|
m_marginTopText = new wxTextCtrl(this, wxPRINTID_TOPMARGIN, wxT(""), wxDefaultPosition, wxSize(textWidth, -1));
|
||||||
column2->Add( m_marginLeftText, 1, wxALL, 5 );
|
column2->Add( m_marginLeftText, 1, wxALL, 5 );
|
||||||
column2->Add( m_marginTopText, 1, wxALL, 5 );
|
column2->Add( m_marginTopText, 1, wxALL, 5 );
|
||||||
table->Add( column2, 0, wxRIGHT|wxTOP|wxBOTTOM | wxEXPAND, 5 );
|
table->Add( column2, 0, wxRIGHT|wxTOP|wxBOTTOM | wxEXPAND, 5 );
|
||||||
@@ -646,8 +646,8 @@ wxDialog(parent, -1, _("Page Setup"), wxPoint(0, 0), wxSize(600, 600), wxDIALOG_
|
|||||||
table->Add( column3, 0, wxALL | wxEXPAND, 5 );
|
table->Add( column3, 0, wxALL | wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer *column4 = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer *column4 = new wxBoxSizer( wxVERTICAL );
|
||||||
m_marginRightText = new wxTextCtrl(this, wxPRINTID_RIGHTMARGIN, "", wxDefaultPosition, wxSize(textWidth, -1));
|
m_marginRightText = new wxTextCtrl(this, wxPRINTID_RIGHTMARGIN, wxT(""), wxDefaultPosition, wxSize(textWidth, -1));
|
||||||
m_marginBottomText = new wxTextCtrl(this, wxPRINTID_BOTTOMMARGIN, "", wxDefaultPosition, wxSize(textWidth, -1));
|
m_marginBottomText = new wxTextCtrl(this, wxPRINTID_BOTTOMMARGIN, wxT(""), wxDefaultPosition, wxSize(textWidth, -1));
|
||||||
column4->Add( m_marginRightText, 1, wxALL, 5 );
|
column4->Add( m_marginRightText, 1, wxALL, 5 );
|
||||||
column4->Add( m_marginBottomText, 1, wxALL, 5 );
|
column4->Add( m_marginBottomText, 1, wxALL, 5 );
|
||||||
table->Add( column4, 0, wxRIGHT|wxTOP|wxBOTTOM | wxEXPAND, 5 );
|
table->Add( column4, 0, wxRIGHT|wxTOP|wxBOTTOM | wxEXPAND, 5 );
|
||||||
|
@@ -518,9 +518,9 @@ bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVi
|
|||||||
|
|
||||||
if (val < m_integerMin || val > m_integerMax)
|
if (val < m_integerMin || val > m_integerMax)
|
||||||
{
|
{
|
||||||
char buf[200];
|
wxChar buf[200];
|
||||||
sprintf(buf, "Value must be an integer between %ld and %ld!", m_integerMin, m_integerMax);
|
wxSprintf(buf, wxT("Value must be an integer between %ld and %ld!"), m_integerMin, m_integerMax);
|
||||||
wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -645,10 +645,10 @@ bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVie
|
|||||||
wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow;
|
wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow;
|
||||||
if (!m_strings->Member(text->GetValue()))
|
if (!m_strings->Member(text->GetValue()))
|
||||||
{
|
{
|
||||||
wxString s("Value ");
|
wxString str( wxT("Value ") );
|
||||||
s += text->GetValue();
|
str += text->GetValue();
|
||||||
s += " is not valid.";
|
str += wxT(" is not valid.");
|
||||||
wxMessageBox(s, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
wxMessageBox(str, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -719,7 +719,7 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV
|
|||||||
wxNode *node = m_strings->First();
|
wxNode *node = m_strings->First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
char *s = (char *)node->Data();
|
wxChar *s = (wxChar *)node->Data();
|
||||||
lbox->Append(s);
|
lbox->Append(s);
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
}
|
}
|
||||||
@@ -736,7 +736,6 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV
|
|||||||
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice)))
|
else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice)))
|
||||||
{
|
{
|
||||||
wxChoice *choice = (wxChoice *)m_propertyWindow;
|
wxChoice *choice = (wxChoice *)m_propertyWindow;
|
||||||
#ifndef __XVIEW__
|
|
||||||
if (choice->GetCount() == 0 && m_strings)
|
if (choice->GetCount() == 0 && m_strings)
|
||||||
{
|
{
|
||||||
// Try to initialize the choice item from 'strings'
|
// Try to initialize the choice item from 'strings'
|
||||||
@@ -744,12 +743,11 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV
|
|||||||
wxNode *node = m_strings->First();
|
wxNode *node = m_strings->First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
char *s = (char *)node->Data();
|
wxChar *s = (wxChar *)node->Data();
|
||||||
choice->Append(s);
|
choice->Append(s);
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
choice->SetStringSelection(property->GetValue().StringValue());
|
choice->SetStringSelection(property->GetValue().StringValue());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -149,7 +149,7 @@ bool wxPropertyListView::UpdatePropertyList(bool clearEditArea)
|
|||||||
if (clearEditArea)
|
if (clearEditArea)
|
||||||
{
|
{
|
||||||
m_valueList->Clear();
|
m_valueList->Clear();
|
||||||
m_valueText->SetValue(_T(""));
|
m_valueText->SetValue( wxT("") );
|
||||||
}
|
}
|
||||||
wxNode *node = m_propertySheet->GetProperties().First();
|
wxNode *node = m_propertySheet->GetProperties().First();
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ wxString wxPropertyListView::MakeNameValueString(wxString name, wxString value)
|
|||||||
if (GetFlags() & wxPROP_SHOWVALUES)
|
if (GetFlags() & wxPROP_SHOWVALUES)
|
||||||
{
|
{
|
||||||
// Want to pad with spaces
|
// Want to pad with spaces
|
||||||
theString.Append(' ', padWith);
|
theString.Append( wxT(' '), padWith);
|
||||||
theString += value;
|
theString += value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +241,7 @@ bool wxPropertyListView::ShowProperty(wxProperty *property, bool select)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_valueList->Clear();
|
m_valueList->Clear();
|
||||||
m_valueText->SetValue(_T(""));
|
m_valueText->SetValue( wxT("") );
|
||||||
|
|
||||||
if (property)
|
if (property)
|
||||||
{
|
{
|
||||||
@@ -894,9 +894,9 @@ bool wxRealListValidator::OnCheckValue(wxProperty *WXUNUSED(property), wxPropert
|
|||||||
|
|
||||||
if (val < m_realMin || val > m_realMax)
|
if (val < m_realMin || val > m_realMax)
|
||||||
{
|
{
|
||||||
char buf[200];
|
wxChar buf[200];
|
||||||
sprintf(buf, "Value must be a real number between %.2f and %.2f!", m_realMin, m_realMax);
|
wxSprintf(buf, wxT("Value must be a real number between %.2f and %.2f!"), m_realMin, m_realMax);
|
||||||
wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -1129,10 +1129,10 @@ bool wxStringListValidator::OnCheckValue(wxProperty *WXUNUSED(property), wxPrope
|
|||||||
|
|
||||||
if (!m_strings->Member(value.GetData()))
|
if (!m_strings->Member(value.GetData()))
|
||||||
{
|
{
|
||||||
wxString s("Value ");
|
wxString str( wxT("Value ") );
|
||||||
s += value.GetData();
|
str += value.GetData();
|
||||||
s += " is not valid.";
|
str += wxT(" is not valid.");
|
||||||
wxMessageBox(s.GetData(), "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow);
|
wxMessageBox( str.GetData(), wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -1563,7 +1563,7 @@ class wxPropertyStringListEditorDialog: public wxDialog
|
|||||||
public:
|
public:
|
||||||
wxPropertyStringListEditorDialog(wxWindow *parent, const wxString& title,
|
wxPropertyStringListEditorDialog(wxWindow *parent, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
long windowStyle = wxDEFAULT_DIALOG_STYLE, const wxString& name = "stringEditorDialogBox"):
|
long windowStyle = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("stringEditorDialogBox")):
|
||||||
wxDialog(parent, -1, title, pos, size, windowStyle, name)
|
wxDialog(parent, -1, title, pos, size, windowStyle, name)
|
||||||
{
|
{
|
||||||
m_stringList = NULL;
|
m_stringList = NULL;
|
||||||
@@ -1613,7 +1613,7 @@ class wxPropertyStringListEditorText: public wxTextCtrl
|
|||||||
public:
|
public:
|
||||||
wxPropertyStringListEditorText(wxWindow *parent, wxWindowID id, const wxString& val,
|
wxPropertyStringListEditorText(wxWindow *parent, wxWindowID id, const wxString& val,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
long windowStyle = 0, const wxString& name = "text"):
|
long windowStyle = 0, const wxString& name = wxT("text")):
|
||||||
wxTextCtrl(parent, id, val, pos, size, windowStyle, wxDefaultValidator, name)
|
wxTextCtrl(parent, id, val, pos, size, windowStyle, wxDefaultValidator, name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -1642,14 +1642,14 @@ bool wxListOfStringsListValidator::EditStringList(wxWindow *parent, wxStringList
|
|||||||
wxPoint(-1, -1), wxSize(-1, -1), 0, NULL, wxLB_SINGLE);
|
wxPoint(-1, -1), wxSize(-1, -1), 0, NULL, wxLB_SINGLE);
|
||||||
|
|
||||||
dialog->m_stringText = new wxPropertyStringListEditorText(dialog,
|
dialog->m_stringText = new wxPropertyStringListEditorText(dialog,
|
||||||
wxID_PROP_SL_TEXT, "", wxPoint(5, 240),
|
wxID_PROP_SL_TEXT, wxT(""), wxPoint(5, 240),
|
||||||
wxSize(300, -1), wxPROCESS_ENTER);
|
wxSize(300, -1), wxPROCESS_ENTER);
|
||||||
dialog->m_stringText->Enable(FALSE);
|
dialog->m_stringText->Enable(FALSE);
|
||||||
|
|
||||||
wxButton *addButton = new wxButton(dialog, wxID_PROP_SL_ADD, "Add", wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight));
|
wxButton *addButton = new wxButton(dialog, wxID_PROP_SL_ADD, wxT("Add"), wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight));
|
||||||
wxButton *deleteButton = new wxButton(dialog, wxID_PROP_SL_DELETE, "Delete", wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight));
|
wxButton *deleteButton = new wxButton(dialog, wxID_PROP_SL_DELETE, wxT("Delete"), wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight));
|
||||||
wxButton *cancelButton = new wxButton(dialog, wxID_CANCEL, "Cancel", wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight));
|
wxButton *cancelButton = new wxButton(dialog, wxID_CANCEL, wxT("Cancel"), wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight));
|
||||||
wxButton *okButton = new wxButton(dialog, wxID_OK, "OK", wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight));
|
wxButton *okButton = new wxButton(dialog, wxID_OK, wxT("OK"), wxPoint(-1, -1), wxSize(largeButtonWidth, largeButtonHeight));
|
||||||
|
|
||||||
#ifndef __WXGTK__
|
#ifndef __WXGTK__
|
||||||
okButton->SetDefault();
|
okButton->SetDefault();
|
||||||
@@ -1701,9 +1701,9 @@ bool wxListOfStringsListValidator::EditStringList(wxWindow *parent, wxStringList
|
|||||||
wxNode *node = stringList->First();
|
wxNode *node = stringList->First();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
char *str = (char *)node->Data();
|
wxChar *str = (wxChar *)node->Data();
|
||||||
// Save node as client data for each listbox item
|
// Save node as client data for each listbox item
|
||||||
dialog->m_listBox->Append(str, (char *)node);
|
dialog->m_listBox->Append(str, (wxChar *)node);
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1807,21 +1807,21 @@ void wxPropertyStringListEditorDialog::SaveCurrentSelection()
|
|||||||
|
|
||||||
wxString txt(m_stringText->GetValue());
|
wxString txt(m_stringText->GetValue());
|
||||||
if (node->Data())
|
if (node->Data())
|
||||||
delete[] (char *)node->Data();
|
delete[] (wxChar *)node->Data();
|
||||||
node->SetData((wxObject *)copystring(txt));
|
node->SetData((wxObject *)wxStrdup(txt));
|
||||||
|
|
||||||
m_listBox->SetString(m_currentSelection, (char *)node->Data());
|
m_listBox->SetString(m_currentSelection, (wxChar *)node->Data());
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPropertyStringListEditorDialog::ShowCurrentSelection()
|
void wxPropertyStringListEditorDialog::ShowCurrentSelection()
|
||||||
{
|
{
|
||||||
if (m_currentSelection == -1)
|
if (m_currentSelection == -1)
|
||||||
{
|
{
|
||||||
m_stringText->SetValue(_T(""));
|
m_stringText->SetValue(wxT(""));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wxNode *node = (wxNode *)m_listBox->wxListBox::GetClientData(m_currentSelection);
|
wxNode *node = (wxNode *)m_listBox->wxListBox::GetClientData(m_currentSelection);
|
||||||
char *txt = (char *)node->Data();
|
wxChar *txt = (wxChar *)node->Data();
|
||||||
m_stringText->SetValue(txt);
|
m_stringText->SetValue(txt);
|
||||||
m_stringText->Enable(TRUE);
|
m_stringText->Enable(TRUE);
|
||||||
}
|
}
|
||||||
|
@@ -270,7 +270,7 @@ void wxTreeLayoutStored::Initialize(int n)
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
m_nodes[i].m_name = "";
|
m_nodes[i].m_name = wxT("");
|
||||||
m_nodes[i].m_active = FALSE;
|
m_nodes[i].m_active = FALSE;
|
||||||
m_nodes[i].m_parentId = -1;
|
m_nodes[i].m_parentId = -1;
|
||||||
m_nodes[i].m_x = 0;
|
m_nodes[i].m_x = 0;
|
||||||
@@ -464,7 +464,7 @@ wxString wxTreeLayoutStored::HitTest(wxMouseEvent& event, wxDC& dc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxString("");
|
return wxString( wxT("") );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
#include "wx/file.h"
|
#include "wx/file.h"
|
||||||
|
#include "wx/filename.h"
|
||||||
|
|
||||||
#if wxUSE_WX_RESOURCES
|
#if wxUSE_WX_RESOURCES
|
||||||
#include "wx/resource.h"
|
#include "wx/resource.h"
|
||||||
@@ -827,9 +828,11 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
wxTheApp->argv = argv;
|
wxTheApp->argv = argv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxString name(wxFileNameFromPath(argv[0]));
|
if (wxTheApp->argc > 0)
|
||||||
wxStripExtension( name );
|
{
|
||||||
wxTheApp->SetAppName( name );
|
wxFileName fname( wxTheApp->argv[0] );
|
||||||
|
wxTheApp->SetAppName( fname.GetName() );
|
||||||
|
}
|
||||||
|
|
||||||
int retValue;
|
int retValue;
|
||||||
retValue = wxEntryInitGui();
|
retValue = wxEntryInitGui();
|
||||||
|
@@ -375,8 +375,14 @@ int wxComboBox::FindString( const wxString &item )
|
|||||||
{
|
{
|
||||||
GtkBin *bin = GTK_BIN( child->data );
|
GtkBin *bin = GTK_BIN( child->data );
|
||||||
GtkLabel *label = GTK_LABEL( bin->child );
|
GtkLabel *label = GTK_LABEL( bin->child );
|
||||||
if (item == wxString(label->label,*wxConvCurrent))
|
#ifdef __WXGTK20__
|
||||||
|
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString str( label->label );
|
||||||
|
#endif
|
||||||
|
if (item == str)
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
child = child->next;
|
child = child->next;
|
||||||
}
|
}
|
||||||
@@ -419,7 +425,7 @@ wxString wxComboBox::GetString( int n ) const
|
|||||||
GtkBin *bin = GTK_BIN( child->data );
|
GtkBin *bin = GTK_BIN( child->data );
|
||||||
GtkLabel *label = GTK_LABEL( bin->child );
|
GtkLabel *label = GTK_LABEL( bin->child );
|
||||||
#ifdef __WXGTK20__
|
#ifdef __WXGTK20__
|
||||||
str = wxGTK_CONV_BACK( gtk_label_get_text( label) );
|
str = wxGTK_CONV_BACK( gtk_label_get_text(label) );
|
||||||
#else
|
#else
|
||||||
str = wxString( label->label );
|
str = wxString( label->label );
|
||||||
#endif
|
#endif
|
||||||
@@ -442,7 +448,12 @@ wxString wxComboBox::GetStringSelection() const
|
|||||||
if (selection)
|
if (selection)
|
||||||
{
|
{
|
||||||
GtkBin *bin = GTK_BIN( selection->data );
|
GtkBin *bin = GTK_BIN( selection->data );
|
||||||
wxString tmp = wxString(GTK_LABEL( bin->child )->label,*wxConvCurrent);
|
GtkLabel *label = GTK_LABEL( bin->child );
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
wxString tmp( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString tmp( label->label );
|
||||||
|
#endif
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -77,7 +77,7 @@ void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dial
|
|||||||
|
|
||||||
// printf( "font %s\n", fontname );
|
// printf( "font %s\n", fontname );
|
||||||
|
|
||||||
dialog->SetChosenFont(fontname);
|
dialog->SetChosenFont( fontname);
|
||||||
|
|
||||||
g_free( fontname );
|
g_free( fontname );
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ wxFontDialog::~wxFontDialog()
|
|||||||
|
|
||||||
void wxFontDialog::SetChosenFont(const char *fontname)
|
void wxFontDialog::SetChosenFont(const char *fontname)
|
||||||
{
|
{
|
||||||
m_fontData.SetChosenFont(wxFont(fontname));
|
m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_FONTDLG
|
#endif // wxUSE_FONTDLG
|
||||||
|
@@ -1057,7 +1057,7 @@ wxSize wxListBox::DoGetBestSize() const
|
|||||||
|
|
||||||
// And just a bit more
|
// And just a bit more
|
||||||
int cx, cy;
|
int cx, cy;
|
||||||
GetTextExtent("X", &cx, &cy);
|
GetTextExtent( wxT("X"), &cx, &cy);
|
||||||
lbWidth += 3 * cx;
|
lbWidth += 3 * cx;
|
||||||
|
|
||||||
// don't make the listbox too tall (limit height to around 10 items) but don't
|
// don't make the listbox too tall (limit height to around 10 items) but don't
|
||||||
|
@@ -1142,7 +1142,9 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem)
|
|||||||
{
|
{
|
||||||
// start of a new radio group
|
// start of a new radio group
|
||||||
item_type = "<RadioItem>";
|
item_type = "<RadioItem>";
|
||||||
m_pathLastRadio = bufPath + 1;
|
wxString tmp( wxGTK_CONV_BACK( bufPath ) );
|
||||||
|
tmp.Remove(0,1);
|
||||||
|
m_pathLastRadio = tmp;
|
||||||
}
|
}
|
||||||
else // continue the radio group
|
else // continue the radio group
|
||||||
{
|
{
|
||||||
|
@@ -160,7 +160,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style )
|
|||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
|
|
||||||
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
|
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
|
||||||
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, "popup" ))
|
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") ))
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
|
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -418,7 +418,7 @@ bool wxRadioBox::Show( bool show )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxRadioBox::FindString( const wxString &s ) const
|
int wxRadioBox::FindString( const wxString &find ) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid radiobox") );
|
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid radiobox") );
|
||||||
|
|
||||||
@@ -428,7 +428,12 @@ int wxRadioBox::FindString( const wxString &s ) const
|
|||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
||||||
if (s == label->label)
|
#ifdef __WXGTK20__
|
||||||
|
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString str( label->label );
|
||||||
|
#endif
|
||||||
|
if (find == str)
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
@@ -505,7 +510,13 @@ wxString wxRadioBox::GetString( int n ) const
|
|||||||
|
|
||||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
||||||
|
|
||||||
return wxString( label->label );
|
#ifdef __WXGTK20__
|
||||||
|
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString str( label->label );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioBox::SetLabel( const wxString& label )
|
void wxRadioBox::SetLabel( const wxString& label )
|
||||||
@@ -592,7 +603,12 @@ wxString wxRadioBox::GetStringSelection() const
|
|||||||
{
|
{
|
||||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
||||||
|
|
||||||
return label->label;
|
#ifdef __WXGTK20__
|
||||||
|
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString str( label->label );
|
||||||
|
#endif
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
}
|
}
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
#include "wx/file.h"
|
#include "wx/file.h"
|
||||||
|
#include "wx/filename.h"
|
||||||
|
|
||||||
#if wxUSE_WX_RESOURCES
|
#if wxUSE_WX_RESOURCES
|
||||||
#include "wx/resource.h"
|
#include "wx/resource.h"
|
||||||
@@ -827,9 +828,11 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
wxTheApp->argv = argv;
|
wxTheApp->argv = argv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxString name(wxFileNameFromPath(argv[0]));
|
if (wxTheApp->argc > 0)
|
||||||
wxStripExtension( name );
|
{
|
||||||
wxTheApp->SetAppName( name );
|
wxFileName fname( wxTheApp->argv[0] );
|
||||||
|
wxTheApp->SetAppName( fname.GetName() );
|
||||||
|
}
|
||||||
|
|
||||||
int retValue;
|
int retValue;
|
||||||
retValue = wxEntryInitGui();
|
retValue = wxEntryInitGui();
|
||||||
|
@@ -375,8 +375,14 @@ int wxComboBox::FindString( const wxString &item )
|
|||||||
{
|
{
|
||||||
GtkBin *bin = GTK_BIN( child->data );
|
GtkBin *bin = GTK_BIN( child->data );
|
||||||
GtkLabel *label = GTK_LABEL( bin->child );
|
GtkLabel *label = GTK_LABEL( bin->child );
|
||||||
if (item == wxString(label->label,*wxConvCurrent))
|
#ifdef __WXGTK20__
|
||||||
|
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString str( label->label );
|
||||||
|
#endif
|
||||||
|
if (item == str)
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
child = child->next;
|
child = child->next;
|
||||||
}
|
}
|
||||||
@@ -419,7 +425,7 @@ wxString wxComboBox::GetString( int n ) const
|
|||||||
GtkBin *bin = GTK_BIN( child->data );
|
GtkBin *bin = GTK_BIN( child->data );
|
||||||
GtkLabel *label = GTK_LABEL( bin->child );
|
GtkLabel *label = GTK_LABEL( bin->child );
|
||||||
#ifdef __WXGTK20__
|
#ifdef __WXGTK20__
|
||||||
str = wxGTK_CONV_BACK( gtk_label_get_text( label) );
|
str = wxGTK_CONV_BACK( gtk_label_get_text(label) );
|
||||||
#else
|
#else
|
||||||
str = wxString( label->label );
|
str = wxString( label->label );
|
||||||
#endif
|
#endif
|
||||||
@@ -442,7 +448,12 @@ wxString wxComboBox::GetStringSelection() const
|
|||||||
if (selection)
|
if (selection)
|
||||||
{
|
{
|
||||||
GtkBin *bin = GTK_BIN( selection->data );
|
GtkBin *bin = GTK_BIN( selection->data );
|
||||||
wxString tmp = wxString(GTK_LABEL( bin->child )->label,*wxConvCurrent);
|
GtkLabel *label = GTK_LABEL( bin->child );
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
wxString tmp( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString tmp( label->label );
|
||||||
|
#endif
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -77,7 +77,7 @@ void gtk_fontdialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFontDialog *dial
|
|||||||
|
|
||||||
// printf( "font %s\n", fontname );
|
// printf( "font %s\n", fontname );
|
||||||
|
|
||||||
dialog->SetChosenFont(fontname);
|
dialog->SetChosenFont( fontname);
|
||||||
|
|
||||||
g_free( fontname );
|
g_free( fontname );
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ wxFontDialog::~wxFontDialog()
|
|||||||
|
|
||||||
void wxFontDialog::SetChosenFont(const char *fontname)
|
void wxFontDialog::SetChosenFont(const char *fontname)
|
||||||
{
|
{
|
||||||
m_fontData.SetChosenFont(wxFont(fontname));
|
m_fontData.SetChosenFont(wxFont( wxString::FromAscii(fontname) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_FONTDLG
|
#endif // wxUSE_FONTDLG
|
||||||
|
@@ -1057,7 +1057,7 @@ wxSize wxListBox::DoGetBestSize() const
|
|||||||
|
|
||||||
// And just a bit more
|
// And just a bit more
|
||||||
int cx, cy;
|
int cx, cy;
|
||||||
GetTextExtent("X", &cx, &cy);
|
GetTextExtent( wxT("X"), &cx, &cy);
|
||||||
lbWidth += 3 * cx;
|
lbWidth += 3 * cx;
|
||||||
|
|
||||||
// don't make the listbox too tall (limit height to around 10 items) but don't
|
// don't make the listbox too tall (limit height to around 10 items) but don't
|
||||||
|
@@ -1142,7 +1142,9 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem)
|
|||||||
{
|
{
|
||||||
// start of a new radio group
|
// start of a new radio group
|
||||||
item_type = "<RadioItem>";
|
item_type = "<RadioItem>";
|
||||||
m_pathLastRadio = bufPath + 1;
|
wxString tmp( wxGTK_CONV_BACK( bufPath ) );
|
||||||
|
tmp.Remove(0,1);
|
||||||
|
m_pathLastRadio = tmp;
|
||||||
}
|
}
|
||||||
else // continue the radio group
|
else // continue the radio group
|
||||||
{
|
{
|
||||||
|
@@ -160,7 +160,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style )
|
|||||||
m_needParent = FALSE;
|
m_needParent = FALSE;
|
||||||
|
|
||||||
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
|
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
|
||||||
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, "popup" ))
|
!CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") ))
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
|
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@@ -418,7 +418,7 @@ bool wxRadioBox::Show( bool show )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxRadioBox::FindString( const wxString &s ) const
|
int wxRadioBox::FindString( const wxString &find ) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid radiobox") );
|
wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid radiobox") );
|
||||||
|
|
||||||
@@ -428,7 +428,12 @@ int wxRadioBox::FindString( const wxString &s ) const
|
|||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
||||||
if (s == label->label)
|
#ifdef __WXGTK20__
|
||||||
|
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString str( label->label );
|
||||||
|
#endif
|
||||||
|
if (find == str)
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
@@ -505,7 +510,13 @@ wxString wxRadioBox::GetString( int n ) const
|
|||||||
|
|
||||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
||||||
|
|
||||||
return wxString( label->label );
|
#ifdef __WXGTK20__
|
||||||
|
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString str( label->label );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioBox::SetLabel( const wxString& label )
|
void wxRadioBox::SetLabel( const wxString& label )
|
||||||
@@ -592,7 +603,12 @@ wxString wxRadioBox::GetStringSelection() const
|
|||||||
{
|
{
|
||||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->Data()) );
|
||||||
|
|
||||||
return label->label;
|
#ifdef __WXGTK20__
|
||||||
|
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||||
|
#else
|
||||||
|
wxString str( label->label );
|
||||||
|
#endif
|
||||||
|
return str;
|
||||||
}
|
}
|
||||||
node = node->Next();
|
node = node->Next();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user