Various bug fixes, cosmetic changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-07-07 14:57:42 +00:00
parent 876419ce60
commit bb6290e351
19 changed files with 132 additions and 426 deletions

View File

@@ -367,6 +367,8 @@ typedef void (*wxFunction) (wxObject&, wxEvent&);
*/
#define wxTB_3DBUTTONS 0x8000
// Flatbar/Coolbar under Win98
#define wxTB_FLAT 0x0002
/*
* Apply to all panel items

View File

@@ -966,31 +966,6 @@ class WXDLLEXPORT wxEvtHandler: public wxObject
// Default behaviour
virtual long Default(void) { if (GetNextHandler()) return GetNextHandler()->Default(); else return 0; };
/*
#if WXWIN_COMPATIBILITY
virtual void OldOnMenuCommand(int WXUNUSED(cmd));
virtual void OldOnMenuSelect(int WXUNUSED(cmd));
virtual void OldOnInitMenuPopup(int WXUNUSED(pos));
virtual void OldOnScroll(wxCommandEvent& WXUNUSED(event));
virtual void OldOnPaint(void);
virtual void OldOnSize(int WXUNUSED(width), int WXUNUSED(height));
virtual void OldOnMove(int WXUNUSED(x), int WXUNUSED(y));
virtual void OldOnMouseEvent(wxMouseEvent& WXUNUSED(event));
virtual void OldOnChar(wxKeyEvent& WXUNUSED(event));
// Under Windows, we can intercept character input per dialog or frame
virtual bool OldOnCharHook(wxKeyEvent& WXUNUSED(event));
virtual void OldOnActivate(bool WXUNUSED(active));
virtual void OldOnSetFocus(void);
virtual void OldOnKillFocus(void);
virtual bool OldOnSysColourChange(void);
virtual void OldOnDropFiles(int n, char *files[], int x, int y);
virtual void OnDefaultAction(wxControl *WXUNUSED(initiatingItem)) {};
virtual void OnChangeFocus(wxControl *WXUNUSED(from), wxControl *WXUNUSED(to)) {};
virtual bool OnFunctionKey(wxKeyEvent &WXUNUSED(event)) { return FALSE; };
#endif
*/
virtual bool OnClose(void);
inline char *GetClientData(void) const { return m_clientData; }

View File

@@ -56,7 +56,7 @@ void wxDebugFree(void * buf, bool isVect = FALSE);
void * operator new (size_t size, char * fileName, int lineNum);
void operator delete (void * buf);
#if !( defined (_MSC_VER) && (_MSC_VER <= 800) )
#if !( defined (_MSC_VER) && (_MSC_VER <= 1000) )
void * operator new[] (size_t size, char * fileName, int lineNum);
void operator delete[] (void * buf);
#endif

View File

@@ -34,80 +34,75 @@ class WXDLLEXPORT wxLog;
WXDLLEXPORT_DATA(extern wxApp*) wxTheApp;
void WXDLLEXPORT wxCleanUp(void);
void WXDLLEXPORT wxCommonCleanUp(void); // Call this from the platform's wxCleanUp()
void WXDLLEXPORT wxCommonInit(void); // Call this from the platform's initialization
void WXDLLEXPORT wxCleanUp();
void WXDLLEXPORT wxCommonCleanUp(); // Call this from the platform's wxCleanUp()
void WXDLLEXPORT wxCommonInit(); // Call this from the platform's initialization
// Force an exit from main loop
void WXDLLEXPORT wxExit(void);
void WXDLLEXPORT wxExit();
// Yield to other apps/messages
bool WXDLLEXPORT wxYield(void);
bool WXDLLEXPORT wxYield();
// Represents the application. Derive OnInit and declare
// a new App object to start application
class WXDLLEXPORT wxApp: public wxEvtHandler
{
DECLARE_DYNAMIC_CLASS(wxApp)
wxApp(void);
inline ~wxApp(void) {}
wxApp();
inline ~wxApp() {}
static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; }
static wxAppInitializerFunction GetInitializerFunction(void) { return m_appInitFn; }
static wxAppInitializerFunction GetInitializerFunction() { return m_appInitFn; }
virtual int MainLoop(void);
void ExitMainLoop(void);
bool Initialized(void);
virtual bool Pending(void) ;
virtual void Dispatch(void) ;
virtual int MainLoop();
void ExitMainLoop();
bool Initialized();
virtual bool Pending() ;
virtual void Dispatch() ;
virtual void OnIdle(wxIdleEvent& event);
// Generic
virtual bool OnInit(void) { return FALSE; };
virtual bool OnInit() { return FALSE; };
// No specific tasks to do here.
virtual bool OnInitGui(void) { return TRUE; }
virtual bool OnInitGui() { return TRUE; }
// Called to set off the main loop
virtual int OnRun(void) { return MainLoop(); };
virtual int OnExit(void) { return 0; };
virtual int OnRun() { return MainLoop(); };
virtual int OnExit() { return 0; };
inline void SetPrintMode(int mode) { m_printMode = mode; }
inline int GetPrintMode(void) const { return m_printMode; }
inline int GetPrintMode() const { return m_printMode; }
inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; }
inline bool GetExitOnFrameDelete(void) const { return m_exitOnFrameDelete; }
inline bool GetExitOnFrameDelete() const { return m_exitOnFrameDelete; }
/*
inline void SetShowFrameOnInit(bool flag) { m_showOnInit = flag; }
inline bool GetShowFrameOnInit(void) const { return m_showOnInit; }
*/
inline wxString GetAppName(void) const {
inline wxString GetAppName() const {
if (m_appName != "")
return m_appName;
else return m_className;
}
inline void SetAppName(const wxString& name) { m_appName = name; };
inline wxString GetClassName(void) const { return m_className; }
inline wxString GetClassName() const { return m_className; }
inline void SetClassName(const wxString& name) { m_className = name; }
wxWindow *GetTopWindow(void) const ;
wxWindow *GetTopWindow() const ;
inline void SetTopWindow(wxWindow *win) { m_topWindow = win; }
inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; }
inline bool GetWantDebugOutput(void) { return m_wantDebugOutput; }
inline bool GetWantDebugOutput() { return m_wantDebugOutput; }
// Send idle event to all top-level windows.
// Returns TRUE if more idle time is requested.
bool SendIdleEvents(void);
bool SendIdleEvents();
// Send idle event to window and all subwindows
// Returns TRUE if more idle time is requested.
bool SendIdleEvents(wxWindow* win);
inline void SetAuto3D(bool flag) { m_auto3D = flag; }
inline bool GetAuto3D(void) const { return m_auto3D; }
inline bool GetAuto3D() const { return m_auto3D; }
// Creates a log object
virtual wxLog* CreateLogTarget();
@@ -141,24 +136,15 @@ public:
// Implementation
static bool Initialize(WXHINSTANCE instance);
static void CommonInit(void);
static bool RegisterWindowClasses(void);
static void CleanUp(void);
static void CommonCleanUp(void);
virtual bool DoMessage(void);
static void CommonInit();
static bool RegisterWindowClasses();
static void CleanUp();
static void CommonCleanUp();
virtual bool DoMessage();
virtual bool ProcessMessage(WXMSG* pMsg);
void DeletePendingObjects(void);
bool ProcessIdle(void);
/*
inline void SetPendingCleanup(bool flag) { m_pendingCleanup = flag; }
inline bool GetPendingCleanup(void) { return m_pendingCleanup; }
bool DoResourceCleanup(void);
// Set resource collection scheme on or off.
inline void SetResourceCollection(bool flag) { m_resourceCollection = flag; }
inline bool GetResourceCollection(void) { return m_resourceCollection; }
*/
void DeletePendingObjects();
bool ProcessIdle();
int GetComCtl32Version() const;
public:
static long sm_lastMessageTime;

View File

@@ -50,20 +50,6 @@ public:
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
#if WXWIN_COMPATIBILITY
/*
// The default thing is to set the focus for the first child window.
// Override for your own behaviour.
virtual void OldOnActivate(bool flag);
// Default behaviour is to display a help string for the menu item.
virtual void OldOnMenuSelect(int id);
inline virtual void OldOnMenuCommand(int WXUNUSED(id)) {}; // Called on frame menu command
void OldOnSize(int x, int y);
*/
#endif
virtual bool Destroy(void);
void SetClientSize(int width, int height);
void GetClientSize(int *width, int *height) const;

View File

@@ -52,7 +52,7 @@ public:
// do it (call this in response to a mouse button press, for example)
// params: if bAllowMove is false, data can be only copied
DragResult DoDragDrop(bool bAllowMove = false);
DragResult DoDragDrop(bool bAllowMove = FALSE);
// overridable: you may give some custom UI feedback during d&d operation
// in this function (it's called on each mouse move, so it shouldn't be too

View File

@@ -392,26 +392,6 @@ public:
void OnPaint(wxPaintEvent& event);
void OnIdle(wxIdleEvent& event);
// virtual void OnChangeFocus(wxControl *from, wxControl *to);
// virtual bool OnFunctionKey(wxKeyEvent &event);
/*
#if WXWIN_COMPATIBILITY
virtual void OldOnMenuSelect(int WXUNUSED(cmd));
virtual void OldOnInitMenuPopup(int WXUNUSED(pos));
virtual void OldOnScroll(wxCommandEvent& WXUNUSED(event));
virtual void OldOnPaint(void); // Called when needs painting
virtual void OldOnSize(int width, int height); // Called on resize
virtual void OldOnMouseEvent(wxMouseEvent& event); // Called on mouse event
virtual void OldOnChar(wxKeyEvent& event); // Called on character event
virtual void OldOnMenuCommand(int cmd); // Dealt with properly in wxFrame
inline virtual void OldOnMove(int WXUNUSED(x), int WXUNUSED(y)); // Called on move
inline virtual void OldOnActivate(bool WXUNUSED(active)); // Called on window activation (MSW)
virtual void OldOnSetFocus(void); // Called on setting focus
virtual void OldOnKillFocus(void); // Called on killing focus
#endif
*/
public:
////////////////////////////////////////////////////////////////////////
//// IMPLEMENTATION
@@ -616,11 +596,6 @@ protected:
int m_caretHeight;
bool m_caretEnabled;
bool m_caretShown;
// Device context being stored whilst drawing is done
// WXHDC m_tempHDC;
// Temporary device context stored during an OnPaint
// WXHDC m_paintHDC;
wxFont m_windowFont; // Window's font
bool m_isShown;
bool m_doubleClickAllowed ;
@@ -642,8 +617,6 @@ protected:
bool m_backgroundTransparent;
// wxDC * m_windowDC; // The canvas's device context
int m_xThumbSize;
int m_yThumbSize;
@@ -709,20 +682,8 @@ inline wxColour wxWindow::GetDefaultBackgroundColour(void) const { return m_defa
inline wxButton *wxWindow::GetDefaultItem(void) const { return m_defaultItem; }
inline void wxWindow::SetDefaultItem(wxButton *but) { m_defaultItem = but; }
// inline wxDC *wxWindow::GetDC(void) const { return m_windowDC; }
inline bool wxWindow::IsRetained(void) const { return ((m_windowStyle & wxRETAINED) == wxRETAINED); }
/*
#if WXWIN_COMPATIBILITY
inline void wxWindow::OldOnMenuSelect(int WXUNUSED(cmd)) { Default(); };
inline void wxWindow::OldOnInitMenuPopup(int WXUNUSED(pos)) { Default(); };
inline void wxWindow::OldOnScroll(wxCommandEvent& WXUNUSED(event)) { Default(); };
inline void wxWindow::OldOnMenuCommand(int WXUNUSED(cmd)) { Default(); } // Dealt with properly in wxFrame
inline void wxWindow::OldOnMove(int WXUNUSED(x), int WXUNUSED(y)) { Default(); }; // Called on move
inline void wxWindow::OldOnActivate(bool WXUNUSED(active)) { Default(); }; // Called on window activation (MSW)
#endif
*/
inline void wxWindow::SetShowing(bool show) { m_isShown = show; }
inline wxList *wxWindow::GetConstraintsInvolvedIn(void) const { return m_constraintsInvolvedIn; }
inline wxSizer *wxWindow::GetSizer(void) const { return m_windowSizer; }