removed all compile- and run-time checks for GTK+ < 2.4; don't include the generic files which are now never used in wxGTK in the build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,6 +25,13 @@ class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent;
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[];
|
||||
extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[];
|
||||
|
||||
// show the colour in HTML form (#AABBCC) as colour button label
|
||||
#define wxCLRBTN_SHOW_LABEL 100
|
||||
|
||||
// the default style
|
||||
#define wxCLRBTN_DEFAULT_STYLE (wxCLRBTN_SHOW_LABEL)
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxColourPickerWidgetBase: a generic abstract interface which must be
|
||||
@@ -70,7 +77,7 @@ protected:
|
||||
// same prototype for their contructor (and also explains why we use
|
||||
// define instead of a typedef)
|
||||
// since GTK > 2.4, there is GtkColorButton
|
||||
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
|
||||
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/clrpicker.h"
|
||||
#define wxColourPickerWidget wxColourButton
|
||||
#else
|
||||
|
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
// class name
|
||||
extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxCollapsiblePaneNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCollapsiblePaneBase: interface for wxCollapsiblePane
|
||||
@@ -90,7 +92,7 @@ typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEv
|
||||
wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
|
||||
|
||||
|
||||
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
|
||||
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/collpane.h"
|
||||
#else
|
||||
#include "wx/generic/collpaneg.h"
|
||||
|
@@ -106,7 +106,7 @@ protected:
|
||||
#define wxDirDialog wxGenericDirDialog
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/dirdlg.h" // Native MSW
|
||||
#elif defined(__WXGTK24__)
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/dirdlg.h" // Native GTK for gtk2.4
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/generic/dirdlgg.h"
|
||||
|
@@ -73,7 +73,7 @@ void GenerateFolderChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd );
|
||||
void GenerateSelectionChangedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd );
|
||||
void GenerateFileActivatedEvent( wxFileCtrlBase *fileCtrl, wxWindow *wnd, const wxString filename = wxEmptyString );
|
||||
|
||||
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
|
||||
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#define wxFileCtrl wxGtkFileCtrl
|
||||
#include "wx/gtk/filectrl.h"
|
||||
#else
|
||||
|
@@ -192,7 +192,7 @@ wxSaveFileSelector(const wxString& what,
|
||||
#include "wx/msw/filedlg.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/motif/filedlg.h"
|
||||
#elif defined(__WXGTK24__)
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/filedlg.h" // GTK+ > 2.4 has native version
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk1/filedlg.h"
|
||||
|
@@ -66,8 +66,11 @@ protected:
|
||||
// uses the currently selected font to draw the label of the button
|
||||
#define wxFNTP_USEFONT_FOR_LABEL 0x0010
|
||||
|
||||
// since GTK > 2.4, there is GtkFontButton
|
||||
#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
|
||||
#define wxFONTBTN_DEFAULT_STYLE \
|
||||
(wxFNTP_FONTDESC_AS_LABEL | wxFNTP_USEFONT_FOR_LABEL)
|
||||
|
||||
// native version currently only exists in wxGTK2
|
||||
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#include "wx/gtk/fontpicker.h"
|
||||
#define wxFontPickerWidget wxFontButton
|
||||
#else
|
||||
|
@@ -19,13 +19,6 @@
|
||||
// wxGenericColourButton: a button which brings up a wxColourDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// show the colour in HTML form (#AABBCC) as colour button label
|
||||
#define wxCLRBTN_SHOW_LABEL 100
|
||||
|
||||
// the default style
|
||||
#define wxCLRBTN_DEFAULT_STYLE (wxCLRBTN_SHOW_LABEL)
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGenericColourButton : public wxButton,
|
||||
public wxColourPickerWidgetBase
|
||||
{
|
||||
|
@@ -16,9 +16,6 @@
|
||||
class WXDLLIMPEXP_FWD_CORE wxButton;
|
||||
class WXDLLIMPEXP_FWD_CORE wxStaticLine;
|
||||
|
||||
// class name
|
||||
extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxCollapsiblePaneNameStr[];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGenericCollapsiblePane
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -19,9 +19,6 @@
|
||||
// wxGenericFontButton: a button which brings up a wxColourDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define wxFONTBTN_DEFAULT_STYLE \
|
||||
(wxFNTP_FONTDESC_AS_LABEL | wxFNTP_USEFONT_FOR_LABEL)
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGenericFontButton : public wxButton,
|
||||
public wxFontPickerWidgetBase
|
||||
{
|
||||
|
@@ -12,16 +12,12 @@
|
||||
#ifndef _WX_GTK_CLRPICKER_H_
|
||||
#define _WX_GTK_CLRPICKER_H_
|
||||
|
||||
// since GtkColorButton is available only for GTK+ >= 2.4,
|
||||
// we need to use generic version if we detect (at runtime)
|
||||
// that GTK+ < 2.4
|
||||
#include "wx/generic/clrpickerg.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxColourButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxColourButton : public wxGenericColourButton
|
||||
class WXDLLIMPEXP_CORE wxColourButton : public wxButton,
|
||||
public wxColourPickerWidgetBase
|
||||
{
|
||||
public:
|
||||
wxColourButton() : m_topParent(NULL) {}
|
||||
@@ -38,11 +34,6 @@ public:
|
||||
Create(parent, id, initial, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
virtual ~wxColourButton();
|
||||
|
||||
|
||||
public: // overrides
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxColour& initial = *wxBLACK,
|
||||
@@ -52,6 +43,8 @@ public: // overrides
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxColourPickerWidgetNameStr);
|
||||
|
||||
virtual ~wxColourButton();
|
||||
|
||||
protected:
|
||||
void UpdateColour();
|
||||
|
||||
|
@@ -12,13 +12,11 @@
|
||||
#ifndef _WX_COLLAPSABLE_PANEL_H_GTK_
|
||||
#define _WX_COLLAPSABLE_PANEL_H_GTK_
|
||||
|
||||
#include "wx/generic/collpaneg.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxCollapsiblePane
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCollapsiblePane : public wxGenericCollapsiblePane
|
||||
class WXDLLIMPEXP_CORE wxCollapsiblePane : public wxCollapsiblePaneBase
|
||||
{
|
||||
public:
|
||||
wxCollapsiblePane() { Init(); }
|
||||
@@ -51,9 +49,12 @@ public:
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxCollapsiblePaneNameStr);
|
||||
|
||||
void Collapse(bool collapse = true);
|
||||
bool IsCollapsed() const;
|
||||
void SetLabel(const wxString &str);
|
||||
virtual void Collapse(bool collapse = true);
|
||||
virtual bool IsCollapsed() const;
|
||||
virtual void SetLabel(const wxString& str);
|
||||
|
||||
virtual wxWindow *GetPane() const { return m_pPane; }
|
||||
virtual wxString GetLabel() const { return m_strLabel; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
@@ -62,6 +63,11 @@ public: // used by GTK callbacks
|
||||
bool m_bIgnoreNextChange;
|
||||
wxSize m_szCollapsed;
|
||||
|
||||
wxWindow *m_pPane;
|
||||
|
||||
// the button label without ">>" or "<<"
|
||||
wxString m_strLabel;
|
||||
|
||||
private:
|
||||
void OnSize(wxSizeEvent&);
|
||||
|
||||
|
@@ -11,6 +11,8 @@
|
||||
#ifndef _WX_GTK_COMBOBOX_H_
|
||||
#define _WX_GTK_COMBOBOX_H_
|
||||
|
||||
typedef struct _GtkEntry GtkEntry;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxComboBox
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -94,7 +96,6 @@ public:
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
void OnSize( wxSizeEvent &event );
|
||||
void OnChar( wxKeyEvent &event );
|
||||
|
||||
// Standard event handling
|
||||
@@ -131,7 +132,6 @@ public:
|
||||
|
||||
protected:
|
||||
// From wxWindowGTK:
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
// From wxItemContainer:
|
||||
@@ -150,6 +150,9 @@ protected:
|
||||
// override this and return true.
|
||||
virtual bool UseGTKStyleBase() const { return true; }
|
||||
|
||||
// return the GtkEntry part of the combobox
|
||||
GtkEntry *GetEntry() const;
|
||||
|
||||
private:
|
||||
// From wxTextEntry:
|
||||
virtual const wxWindow *GetEditableWindow() const { return this; }
|
||||
|
@@ -10,13 +10,11 @@
|
||||
#ifndef __GTKDIRDLGH__
|
||||
#define __GTKDIRDLGH__
|
||||
|
||||
#include "wx/generic/dirdlgg.h"
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// wxDirDialog
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDirDialog : public wxGenericDirDialog
|
||||
class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
|
||||
{
|
||||
public:
|
||||
wxDirDialog() { }
|
||||
@@ -37,9 +35,6 @@ public: // overrides from wxGenericDirDialog
|
||||
wxString GetPath() const;
|
||||
void SetPath(const wxString& path);
|
||||
|
||||
virtual int ShowModal();
|
||||
virtual bool Show( bool show = true );
|
||||
|
||||
|
||||
protected:
|
||||
// override this from wxTLW since the native
|
||||
@@ -50,9 +45,10 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
void OnFakeOk( wxCommandEvent &event );
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDirDialog)
|
||||
DECLARE_EVENT_TABLE()
|
||||
void OnFakeOk( wxCommandEvent &event );
|
||||
};
|
||||
|
||||
#endif // __GTKDIRDLGH__
|
||||
|
@@ -12,16 +12,12 @@
|
||||
#ifndef _WX_GTK_FONTPICKER_H_
|
||||
#define _WX_GTK_FONTPICKER_H_
|
||||
|
||||
// since GtkFontButton is available only for GTK+ >= 2.4,
|
||||
// we need to use generic version if we detect (at runtime)
|
||||
// that GTK+ < 2.4
|
||||
#include "wx/generic/fontpickerg.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxFontButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxFontButton : public wxGenericFontButton
|
||||
class WXDLLIMPEXP_CORE wxFontButton : public wxButton,
|
||||
public wxFontPickerWidgetBase
|
||||
{
|
||||
public:
|
||||
wxFontButton() {}
|
||||
@@ -37,11 +33,6 @@ public:
|
||||
Create(parent, id, initial, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
virtual ~wxFontButton();
|
||||
|
||||
|
||||
public: // overrides
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxFont& initial = wxNullFont,
|
||||
@@ -51,6 +42,8 @@ public: // overrides
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxFontPickerWidgetNameStr);
|
||||
|
||||
virtual ~wxFontButton();
|
||||
|
||||
protected:
|
||||
void UpdateFont();
|
||||
|
||||
|
Reference in New Issue
Block a user