X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e320a79f187558effb04d92020b470372bbe456..2d93e1335c44ee76c9a5d98bd76ee3df72fa3146:/include/wx/os2/frame.h diff --git a/include/wx/os2/frame.h b/include/wx/os2/frame.h index 7dfaf63fc6..e316c8f32c 100644 --- a/include/wx/os2/frame.h +++ b/include/wx/os2/frame.h @@ -1,24 +1,20 @@ ///////////////////////////////////////////////////////////////////////////// // Name: frame.h // Purpose: wxFrame class -// Author: Julian Smart +// Author: David Webster // Modified by: -// Created: 01/02/97 +// Created: 10/06/99 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) David Webster +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FRAME_H_ #define _WX_FRAME_H_ -#ifdef __GNUG__ - #pragma interface "frame.h" -#endif - #include "wx/window.h" #include "wx/toolbar.h" -#include "wx/msw/accel.h" +#include "wx/os2/accel.h" #include "wx/icon.h" WXDLLEXPORT_DATA(extern const wxChar*) wxFrameNameStr; @@ -28,38 +24,37 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxStatusLineNameStr; class WXDLLEXPORT wxMenuBar; class WXDLLEXPORT wxStatusBar; -class WXDLLEXPORT wxFrame : public wxWindow -{ - DECLARE_DYNAMIC_CLASS(wxFrame) +class WXDLLEXPORT wxFrame: public wxWindow { + + DECLARE_DYNAMIC_CLASS(wxFrame) public: wxFrame(); - wxFrame(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr) + inline wxFrame( wxWindow* parent + ,wxWindowID id + ,const wxString& title + ,const wxPoint& pos = wxDefaultPosition + ,const wxSize& size = wxDefaultSize + ,long style = wxDEFAULT_FRAME_STYLE + ,const wxString& name = wxFrameNameStr + ) { Create(parent, id, title, pos, size, style, name); } ~wxFrame(); - bool Create(wxWindow *parent, - wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, - const wxString& name = wxFrameNameStr); + bool Create( wxWindow* parent + ,wxWindowID id + ,const wxString& title + ,const wxPoint& pos = wxDefaultPosition + ,const wxSize& size = wxDefaultSize + ,long style = wxDEFAULT_FRAME_STYLE + ,const wxString& name = wxFrameNameStr + ); virtual bool Destroy(); - virtual void ClientToScreen(int *x, int *y) const; - virtual void ScreenToClient(int *x, int *y) const; - void OnSize(wxSizeEvent& event); void OnMenuHighlight(wxMenuEvent& event); void OnActivate(wxActivateEvent& event); @@ -68,12 +63,13 @@ public: bool Show(bool show); + void DetachMenuBar(); // Set menu bar void SetMenuBar(wxMenuBar *menu_bar); - virtual wxMenuBar *GetMenuBar() const; + virtual wxMenuBar *GetMenuBar() const ; // Call this to simulate a menu command - bool Command(int id) { return ProcessCommand(id); } + inline bool Command(int id) { return ProcessCommand(id); } // process menu command: returns TRUE if processed bool ProcessCommand(int id); @@ -160,7 +156,7 @@ public: bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu); - bool MSWCreate(int id, wxWindow *parent, const wxChar *wclass, + bool OS2Create(int id, wxWindow *parent, const wxChar *wclass, wxWindow *wx_win, const wxChar *title, int x, int y, int width, int height, long style); @@ -176,11 +172,11 @@ protected: virtual void DoGetSize(int *width, int *height) const; virtual void DoGetPosition(int *x, int *y) const; - virtual void DoSetSize(int x, int y, - int width, int height, - int sizeFlags = wxSIZE_AUTO); virtual void DoSetClientSize(int width, int height); + virtual void DoClientToScreen(int *x, int *y) const; + virtual void DoScreenToClient(int *x, int *y) const; + // a plug in for MDI frame classes which need to do something special when // the menubar is set virtual void InternalSetMenuBar(); @@ -189,10 +185,10 @@ protected: void IconizeChildFrames(bool bIconize); // we add menu bar accel processing - bool MSWTranslateMessage(WXMSG* pMsg); + bool OS2TranslateMessage(WXMSG* pMsg); // window proc for the frames - long MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + MRESULT OS2WindowProc(HWND hwnd, WXUINT message, WXWPARAM wParam, WXLPARAM lParam); wxMenuBar * m_frameMenuBar; wxIcon m_icon; @@ -219,3 +215,4 @@ private: #endif // _WX_FRAME_H_ +