Misc changes for DOS compatibility, plus added wxApp::CreateConfig
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,6 +42,7 @@ bool WXDLLEXPORT wxYield(void);
|
||||
|
||||
// Represents the application. Derive OnInit and declare
|
||||
// a new App object to start application
|
||||
class wxConfig;
|
||||
class WXDLLEXPORT wxApp: public wxEvtHandler
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxApp)
|
||||
@@ -70,6 +71,10 @@ class WXDLLEXPORT wxApp: public wxEvtHandler
|
||||
// No specific tasks to do here.
|
||||
virtual bool OnInitGui(void) { return TRUE; }
|
||||
|
||||
// override this function to create a global wxConfig object of different
|
||||
// than default type (right now the default implementation returns NULL)
|
||||
virtual wxConfig *CreateConfig(void) { return NULL; }
|
||||
|
||||
// Called to set off the main loop
|
||||
virtual int OnRun(void) { return MainLoop(); };
|
||||
virtual int OnExit(void) { return 0; };
|
||||
|
@@ -29,8 +29,8 @@ class WXDLLEXPORT wxScreenDC: public wxDC
|
||||
|
||||
// Compatibility with X's requirements for
|
||||
// drawing on top of all windows
|
||||
static bool StartDrawingOnTop(wxWindow *window) { return TRUE; }
|
||||
static bool StartDrawingOnTop(wxRectangle *rect = NULL) { return TRUE; }
|
||||
static bool StartDrawingOnTop(wxWindow* WXUNUSED(window)) { return TRUE; }
|
||||
static bool StartDrawingOnTop(wxRectangle* WXUNUSED(rect) = NULL) { return TRUE; }
|
||||
static bool EndDrawingOnTop(void) { return TRUE; }
|
||||
};
|
||||
|
||||
|
@@ -17,6 +17,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define USE_CONFIG 1
|
||||
// Use wxConfig, with CreateConfig in wxApp
|
||||
#define __GOODCOMPILER__
|
||||
// gcc can have problems, but Windows compilers
|
||||
// are generally OK.
|
||||
|
@@ -548,8 +548,12 @@ public:
|
||||
//@{
|
||||
/// find a substring
|
||||
size_t find(const wxString& str, size_t nStart = 0) const;
|
||||
|
||||
// VC++ 1.5 can't cope with this syntax.
|
||||
#if ! (defined(_MSC_VER) && !defined(__WIN32__))
|
||||
/// find first n characters of sz
|
||||
size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const;
|
||||
#endif
|
||||
/// find the first occurence of character ch after nStart
|
||||
size_t find(char ch, size_t nStart = 0) const;
|
||||
|
||||
@@ -565,10 +569,13 @@ public:
|
||||
/// as find, but from the end
|
||||
size_t rfind(const wxString& str, size_t nStart = npos) const;
|
||||
/// as find, but from the end
|
||||
// VC++ 1.5 can't cope with this syntax.
|
||||
#if ! (defined(_MSC_VER) && !defined(__WIN32__))
|
||||
size_t rfind(const char* sz, size_t nStart = npos,
|
||||
size_t n = npos) const;
|
||||
/// as find, but from the end
|
||||
size_t rfind(char ch, size_t nStart = npos) const;
|
||||
#endif
|
||||
//@}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user