more Motif fixes (still doesn't compile, but *really* close :-)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/module.h"
|
||||
#include "wx/cmndata.h"
|
||||
#include <fstream.h>
|
||||
|
||||
#include <fstream.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
void SetClippingRegion(long x, long y, long width, long height);
|
||||
void SetClippingRegion( const wxRegion ®ion );
|
||||
void DestroyClippingRegion();
|
||||
|
||||
|
||||
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) {}
|
||||
|
||||
bool StartDoc(const wxString& message);
|
||||
@@ -125,12 +125,12 @@ public:
|
||||
inline void SetBackgroundMode(int WXUNUSED(mode)) {}
|
||||
inline void SetPalette(const wxPalette& WXUNUSED(palette)) {}
|
||||
|
||||
inline ofstream *GetStream(void) const { return m_pstream; }
|
||||
ofstream *GetStream(void) const { return m_pstream; }
|
||||
|
||||
inline wxPrintData& GetPrintData() { return m_printData; }
|
||||
inline void SetPrintData(const wxPrintData& data) { m_printData = data; }
|
||||
|
||||
int GetDepth() const { return 24; }
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& data) { m_printData = data; }
|
||||
|
||||
virtual int GetDepth() const { return 24; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -170,13 +170,15 @@ public:
|
||||
#endif
|
||||
|
||||
// Print Orientation (Should also add Left, Right)
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
PS_PORTRAIT = 1,
|
||||
PS_LANDSCAPE = 2
|
||||
};// ps_orientation = PS_PORTRAIT;
|
||||
|
||||
// Print Actions
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
PS_NONE,
|
||||
PS_PREVIEW,
|
||||
PS_FILE,
|
||||
|
@@ -5,7 +5,7 @@
|
||||
// Modified by:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_NOTEBOOK_H_
|
||||
@@ -35,30 +35,6 @@ class WXDLLEXPORT wxWindow;
|
||||
typedef wxWindow wxNotebookPage; // so far, any window can be a page
|
||||
WX_DEFINE_ARRAY(wxNotebookPage *, wxArrayPages);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// notebook events
|
||||
// ----------------------------------------------------------------------------
|
||||
class WXDLLEXPORT wxNotebookEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxNotebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
||||
int nSel = -1, int nOldSel = -1)
|
||||
: wxCommandEvent(commandType, id) { m_nSel = nSel; m_nOldSel = nOldSel; }
|
||||
|
||||
// accessors
|
||||
int GetSelection() const { return m_nSel; }
|
||||
int GetOldSelection() const { return m_nOldSel; }
|
||||
|
||||
void SetSelection(int sel) { m_nSel = sel; }
|
||||
void SetOldSelection(int oldSel) { m_nOldSel = oldSel; }
|
||||
|
||||
private:
|
||||
int m_nSel, // currently selected page
|
||||
m_nOldSel; // previously selected page
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebookEvent)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNotebook
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -89,14 +65,14 @@ public:
|
||||
wxNotebook();
|
||||
// the same arguments as for wxControl (@@@ any special styles?)
|
||||
wxNotebook(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxString& name = "notebook");
|
||||
// Create() function
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
@@ -184,19 +160,19 @@ public:
|
||||
void OnSelChange(wxNotebookEvent& event);
|
||||
void OnSetFocus(wxFocusEvent& event);
|
||||
void OnNavigationKey(wxNavigationKeyEvent& event);
|
||||
|
||||
|
||||
// base class virtuals
|
||||
// -------------------
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual void SetConstraintSizes(bool recurse = TRUE);
|
||||
virtual bool DoPhase(int nPhase);
|
||||
|
||||
// Implementation
|
||||
// Implementation
|
||||
|
||||
// wxNotebook on Motif uses a generic wxTabView to implement itself.
|
||||
inline wxTabView *GetTabView() const { return m_tabView; }
|
||||
inline void SetTabView(wxTabView *v) { m_tabView = v; }
|
||||
|
||||
wxTabView *GetTabView() const { return m_tabView; }
|
||||
void SetTabView(wxTabView *v) { m_tabView = v; }
|
||||
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
@@ -224,52 +200,4 @@ protected:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event macros
|
||||
// ----------------------------------------------------------------------------
|
||||
typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
|
||||
|
||||
// Because of name truncation!
|
||||
#if defined(__BORLANDC__) && defined(__WIN16__)
|
||||
|
||||
#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
|
||||
{ \
|
||||
wxEVT_COMMAND_NB_PAGE_CHANGED, \
|
||||
id, \
|
||||
-1, \
|
||||
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
|
||||
NULL \
|
||||
},
|
||||
|
||||
#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
|
||||
{ \
|
||||
wxEVT_COMMAND_NB_PAGE_CHANGING, \ \
|
||||
id, \
|
||||
-1, \
|
||||
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
|
||||
NULL \
|
||||
},
|
||||
|
||||
#else
|
||||
|
||||
#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
|
||||
{ \
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
|
||||
id, \
|
||||
-1, \
|
||||
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
|
||||
NULL \
|
||||
},
|
||||
|
||||
#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
|
||||
{ \
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, \ \
|
||||
id, \
|
||||
-1, \
|
||||
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
|
||||
NULL \
|
||||
},
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_NOTEBOOK_H_
|
||||
|
Reference in New Issue
Block a user