Motif and other mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -37,8 +37,8 @@ class WXDLLEXPORT wxFileHistory;
|
||||
class WXDLLEXPORT wxConfigBase;
|
||||
|
||||
#if wxUSE_IOSTREAMH
|
||||
# include <istream.h>
|
||||
# include <ostream.h>
|
||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||
# include <iostream.h>
|
||||
#else
|
||||
# include <istream>
|
||||
# include <ostream>
|
||||
|
@@ -20,15 +20,16 @@
|
||||
|
||||
#include "wx/hash.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
class wxTabView;
|
||||
class WXDLLEXPORT wxTabView;
|
||||
|
||||
/*
|
||||
* A wxTabControl is the internal and visual representation
|
||||
* of the tab.
|
||||
*/
|
||||
|
||||
class wxTabControl: public wxObject
|
||||
class WXDLLEXPORT wxTabControl: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabControl)
|
||||
public:
|
||||
@@ -82,7 +83,7 @@ protected:
|
||||
* are 3 layers in the MS Word Options dialog.
|
||||
*/
|
||||
|
||||
class wxTabLayer: public wxList
|
||||
class WXDLLEXPORT wxTabLayer: public wxList
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabLayer)
|
||||
public:
|
||||
@@ -98,7 +99,7 @@ class wxTabLayer: public wxList
|
||||
#define wxTAB_STYLE_DRAW_BOX 1 // Draws 3D boxes round tab layers
|
||||
#define wxTAB_STYLE_COLOUR_INTERIOR 2 // Colours interior of tabs, otherwise draws outline
|
||||
|
||||
class wxTabView: public wxObject
|
||||
class WXDLLEXPORT wxTabView: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabView)
|
||||
public:
|
||||
@@ -162,6 +163,10 @@ public:
|
||||
inline int GetTabHeight(void) const { return m_tabHeight; }
|
||||
inline void SetTabSelectionHeight(int h) { m_tabSelectionHeight = h; }
|
||||
inline int GetTabSelectionHeight(void) const { return m_tabSelectionHeight; }
|
||||
|
||||
// Returns the total height of the tabs component -- this may be several
|
||||
// times the height of a tab, if there are several tab layers (rows).
|
||||
int GetTotalTabHeight();
|
||||
|
||||
inline int GetTopMargin(void) const { return m_topMargin; }
|
||||
inline void SetTopMargin(int margin) { m_topMargin = margin; }
|
||||
@@ -260,7 +265,7 @@ protected:
|
||||
* A dialog box class that is tab-friendly
|
||||
*/
|
||||
|
||||
class wxTabbedDialog: public wxDialog
|
||||
class WXDLLEXPORT wxTabbedDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabbedDialog)
|
||||
|
||||
@@ -289,7 +294,7 @@ DECLARE_EVENT_TABLE()
|
||||
* A panel class that is tab-friendly
|
||||
*/
|
||||
|
||||
class wxTabbedPanel: public wxPanel
|
||||
class WXDLLEXPORT wxTabbedPanel: public wxPanel
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTabbedPanel)
|
||||
|
||||
@@ -313,7 +318,7 @@ protected:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
class wxPanelTabView: public wxTabView
|
||||
class WXDLLEXPORT wxPanelTabView: public wxTabView
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxPanelTabView)
|
||||
public:
|
||||
@@ -330,6 +335,7 @@ public:
|
||||
inline wxWindow *GetCurrentWindow() const { return m_currentWindow; }
|
||||
|
||||
void ShowWindowForTab(int id);
|
||||
inline wxList& GetWindows() const { return (wxList&) m_tabWindows; }
|
||||
|
||||
protected:
|
||||
// List of panels, one for each tab. Indexed
|
||||
|
@@ -57,7 +57,8 @@ class WXDLLEXPORT wxLogFrame;
|
||||
class WXDLLEXPORT wxFrame;
|
||||
|
||||
#if wxUSE_IOSTREAMH
|
||||
# include <ostream.h>
|
||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||
# include <iostream.h>
|
||||
#else
|
||||
# include <ostream>
|
||||
# ifdef _MSC_VER
|
||||
|
@@ -28,7 +28,8 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#if wxUSE_IOSTREAMH
|
||||
# include <ostream.h>
|
||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||
# include <iostream.h>
|
||||
#else
|
||||
# include <ostream>
|
||||
# ifdef _MSC_VER
|
||||
|
@@ -46,7 +46,7 @@ class WXDLLEXPORT wxButton: public wxControl
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
};
|
||||
|
@@ -47,7 +47,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
};
|
||||
|
@@ -68,7 +68,7 @@ class WXDLLEXPORT wxChoice: public wxControl
|
||||
void SetFocus();
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
|
@@ -74,7 +74,7 @@ class WXDLLEXPORT wxComboBox: public wxChoice
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
};
|
||||
|
@@ -94,7 +94,7 @@ public:
|
||||
void OnSysColourChanged(wxSysColourChangedEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
inline WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||
|
@@ -145,7 +145,7 @@ public:
|
||||
virtual void ReleaseMouse();
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetMenuBarWidget() const ;
|
||||
|
@@ -61,7 +61,7 @@ class WXDLLEXPORT wxGauge: public wxControl
|
||||
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
|
@@ -90,7 +90,7 @@ class WXDLLEXPORT wxListBox: public wxControl
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: notebook.h
|
||||
// Purpose: MSW/GTK compatible notebook (a.k.a. property sheet)
|
||||
// Purpose: wxNotebook class (a.k.a. property sheet, tabbed dialog)
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// RCS-ID: $Id$
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "wx/dynarray.h"
|
||||
#include "wx/event.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/generic/tabg.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// types
|
||||
@@ -59,9 +60,38 @@ private:
|
||||
// wxNotebook
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// @@@ this class should really derive from wxTabCtrl, but the interface is not
|
||||
// exactly the same, so I can't do it right now and instead we reimplement
|
||||
// part of wxTabCtrl here
|
||||
class WXDLLEXPORT wxNotebook;
|
||||
|
||||
// This reuses wxTabView to draw the tabs.
|
||||
class WXDLLEXPORT wxNotebookTabView: public wxTabView
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebookTabView)
|
||||
public:
|
||||
wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
|
||||
~wxNotebookTabView(void);
|
||||
|
||||
// Called when a tab is activated
|
||||
virtual void OnTabActivate(int activateId, int deactivateId);
|
||||
|
||||
/*
|
||||
// Specific to this class
|
||||
void AddTabWindow(int id, wxWindow *window);
|
||||
wxWindow *GetTabWindow(int id) const ;
|
||||
void ClearWindows(bool deleteWindows = TRUE);
|
||||
inline wxWindow *GetCurrentWindow() const { return m_currentWindow; }
|
||||
void ShowWindowForTab(int id);
|
||||
*/
|
||||
|
||||
protected:
|
||||
/*
|
||||
// List of panels, one for each tab. Indexed
|
||||
// by tab ID.
|
||||
wxList m_tabWindows;
|
||||
wxWindow* m_currentWindow;
|
||||
*/
|
||||
wxNotebook* m_notebook;
|
||||
};
|
||||
|
||||
class wxNotebook : public wxControl
|
||||
{
|
||||
public:
|
||||
@@ -163,7 +193,15 @@ public:
|
||||
virtual bool DoPhase(int nPhase);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
|
||||
// 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; }
|
||||
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
@@ -179,6 +217,8 @@ protected:
|
||||
|
||||
int m_nSelection; // the current selection (-1 if none)
|
||||
|
||||
wxTabView* m_tabView;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxNotebook)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
inline void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
};
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
|
@@ -78,7 +78,7 @@ public:
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
|
@@ -65,7 +65,7 @@ class WXDLLEXPORT wxSpinButton: public wxControl
|
||||
void Command(wxCommandEvent& event) { ProcessCommand(event); };
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
|
@@ -57,7 +57,7 @@ class WXDLLEXPORT wxStaticBitmap: public wxControl
|
||||
virtual bool AcceptsFocus() const { return FALSE; }
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
|
||||
|
@@ -52,7 +52,7 @@ class WXDLLEXPORT wxStaticBox: public wxControl
|
||||
wxString GetLabel() const;
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||
|
@@ -48,7 +48,7 @@ class WXDLLEXPORT wxStaticText: public wxControl
|
||||
virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
};
|
||||
|
@@ -127,7 +127,7 @@ public:
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont();
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
inline void SetModified(bool mod) { m_modified = mod; }
|
||||
|
@@ -488,7 +488,7 @@ public:
|
||||
virtual WXRegion GetPaintRegion() const { return m_paintRegion; }
|
||||
|
||||
// Change properties
|
||||
virtual void ChangeFont(); // Change to the current font (often overridden)
|
||||
virtual void ChangeFont(bool keepOriginalSize = TRUE); // Change to the current font (often overridden)
|
||||
virtual void DoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
|
||||
virtual void DoChangeBackgroundColour(WXWidget widget, wxColour& backgroundColour, bool changeArmColour = FALSE);
|
||||
// These to be overridden as needed (may change several widgets)
|
||||
|
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
// copy ctors and assignment operators
|
||||
wxColour( const wxColour& col );
|
||||
wxColour( const wxColour* col );
|
||||
// wxColour( const wxColour* col );
|
||||
wxColour& operator = ( const wxColour& col );
|
||||
|
||||
// dtor
|
||||
|
@@ -37,7 +37,8 @@ class WXDLLEXPORT wxHashTable;
|
||||
class WXDLLEXPORT wxObject_Serialize;
|
||||
|
||||
#if wxUSE_IOSTREAMH
|
||||
# include <ostream.h>
|
||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||
# include <iostream.h>
|
||||
#else
|
||||
# include <ostream>
|
||||
# ifdef _MSC_VER
|
||||
|
@@ -923,7 +923,8 @@ inline bool operator>=(const char * s1, const wxString& s2) { return s2.Cmp(s1)
|
||||
// replacing with includes (on advice of ungod@pasdex.com.au)
|
||||
// class WXDLLEXPORT istream;
|
||||
#if wxUSE_IOSTREAMH
|
||||
#include <istream.h>
|
||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <istream>
|
||||
# ifdef _MSC_VER
|
||||
|
Reference in New Issue
Block a user