/////////////////////////////////////////////////////////////////////////////
// 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;
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);
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);
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);
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();
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;
#endif
// _WX_FRAME_H_
+