Merge in from trunk r67662 to r64801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,7 +69,7 @@ public:
|
||||
|
||||
// icon to be shown in the dialog, defaults to the main frame icon
|
||||
void SetIcon(const wxIcon& icon) { m_icon = icon; }
|
||||
bool HasIcon() const { return m_icon.Ok(); }
|
||||
bool HasIcon() const { return m_icon.IsOk(); }
|
||||
wxIcon GetIcon() const;
|
||||
|
||||
// web site for the program and its description (defaults to URL itself if
|
||||
|
@@ -36,7 +36,8 @@ class WXDLLIMPEXP_CORE wxAffineMatrix2DBase
|
||||
{
|
||||
public:
|
||||
wxAffineMatrix2DBase() {}
|
||||
|
||||
virtual ~wxAffineMatrix2DBase() {}
|
||||
|
||||
// sets the matrix to the respective values
|
||||
virtual void Set(const wxMatrix2D& mat2D, const wxPoint2DDouble& tr) = 0;
|
||||
|
||||
|
202
include/wx/anybutton.h
Normal file
202
include/wx/anybutton.h
Normal file
@@ -0,0 +1,202 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/anybutton.h
|
||||
// Purpose: wxAnyButtonBase class
|
||||
// Author: Vadim Zetlin
|
||||
// Created: 2000-08-15 (extracted from button.h)
|
||||
// RCS-ID: $Id: anybutton.h 65680 2010-09-30 11:44:45Z VZ $
|
||||
// Copyright: (c) Vadim Zetlin
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_ANYBUTTON_H_BASE_
|
||||
#define _WX_ANYBUTTON_H_BASE_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#ifdef wxHAS_ANY_BUTTON
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAnyButton specific flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// These flags affect label alignment
|
||||
#define wxBU_LEFT 0x0040
|
||||
#define wxBU_TOP 0x0080
|
||||
#define wxBU_RIGHT 0x0100
|
||||
#define wxBU_BOTTOM 0x0200
|
||||
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
|
||||
|
||||
// These two flags are obsolete
|
||||
#define wxBU_NOAUTODRAW 0x0000
|
||||
#define wxBU_AUTODRAW 0x0004
|
||||
|
||||
// by default, the buttons will be created with some (system dependent)
|
||||
// minimal size to make them look nicer, giving this style will make them as
|
||||
// small as possible
|
||||
#define wxBU_EXACTFIT 0x0001
|
||||
|
||||
// this flag can be used to disable using the text label in the button: it is
|
||||
// mostly useful when creating buttons showing bitmap and having stock id as
|
||||
// without it both the standard label corresponding to the stock id and the
|
||||
// bitmap would be shown
|
||||
#define wxBU_NOTEXT 0x0002
|
||||
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/control.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAnyButton: common button functionality
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxAnyButtonBase : public wxControl
|
||||
{
|
||||
public:
|
||||
wxAnyButtonBase() { }
|
||||
|
||||
// show the image in the button in addition to the label: this method is
|
||||
// supported on all (major) platforms
|
||||
void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT)
|
||||
{
|
||||
SetBitmapLabel(bitmap);
|
||||
SetBitmapPosition(dir);
|
||||
}
|
||||
|
||||
wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); }
|
||||
|
||||
// Methods for setting individual images for different states: normal,
|
||||
// selected (meaning pushed or pressed), focused (meaning normal state for
|
||||
// a focused button), disabled or hover (a.k.a. hot or current).
|
||||
//
|
||||
// Remember that SetBitmap() itself must be called before any other
|
||||
// SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym
|
||||
// for it anyhow) and that all bitmaps passed to these functions should be
|
||||
// of the same size.
|
||||
void SetBitmapLabel(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Normal); }
|
||||
void SetBitmapPressed(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Pressed); }
|
||||
void SetBitmapDisabled(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Disabled); }
|
||||
void SetBitmapCurrent(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Current); }
|
||||
void SetBitmapFocus(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Focused); }
|
||||
|
||||
wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); }
|
||||
wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); }
|
||||
wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); }
|
||||
wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); }
|
||||
wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); }
|
||||
|
||||
|
||||
// set the margins around the image
|
||||
void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); }
|
||||
void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); }
|
||||
wxSize GetBitmapMargins() { return DoGetBitmapMargins(); }
|
||||
|
||||
// set the image position relative to the text, i.e. wxLEFT means that the
|
||||
// image is to the left of the text (this is the default)
|
||||
void SetBitmapPosition(wxDirection dir);
|
||||
|
||||
|
||||
// Buttons on MSW can look bad if they are not native colours, because
|
||||
// then they become owner-drawn and not theme-drawn. Disable it here
|
||||
// in wxAnyButtonBase to make it consistent.
|
||||
virtual bool ShouldInheritColours() const { return false; }
|
||||
|
||||
// wxUniv-compatible and deprecated equivalents to SetBitmapXXX()
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
void SetImageLabel(const wxBitmap& bitmap) { SetBitmap(bitmap); }
|
||||
void SetImageMargins(wxCoord x, wxCoord y) { SetBitmapMargins(x, y); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
// backwards compatible names for pressed/current bitmaps: they're not
|
||||
// deprecated as there is nothing really wrong with using them and no real
|
||||
// advantage to using the new names but the new names are still preferred
|
||||
wxBitmap GetBitmapSelected() const { return GetBitmapPressed(); }
|
||||
wxBitmap GetBitmapHover() const { return GetBitmapCurrent(); }
|
||||
|
||||
void SetBitmapSelected(const wxBitmap& bitmap) { SetBitmapPressed(bitmap); }
|
||||
void SetBitmapHover(const wxBitmap& bitmap) { SetBitmapCurrent(bitmap); }
|
||||
|
||||
|
||||
// this enum is not part of wx public API, it is public because it is used
|
||||
// in non wxAnyButton-derived classes internally
|
||||
//
|
||||
// also notice that MSW code relies on the values of the enum elements, do
|
||||
// not change them without revising src/msw/button.cpp
|
||||
enum State
|
||||
{
|
||||
State_Normal,
|
||||
State_Current, // a.k.a. hot or "hovering"
|
||||
State_Pressed, // a.k.a. "selected" in public API for some reason
|
||||
State_Disabled,
|
||||
State_Focused,
|
||||
State_Max
|
||||
};
|
||||
|
||||
// return true if this button shouldn't show the text label, either because
|
||||
// it doesn't have it or because it was explicitly disabled with wxBU_NOTEXT
|
||||
bool DontShowLabel() const
|
||||
{
|
||||
return HasFlag(wxBU_NOTEXT) || GetLabel().empty();
|
||||
}
|
||||
|
||||
// return true if we do show the label
|
||||
bool ShowsLabel() const
|
||||
{
|
||||
return !DontShowLabel();
|
||||
}
|
||||
|
||||
protected:
|
||||
// choose the default border for this window
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State WXUNUSED(which)) const
|
||||
{ return wxBitmap(); }
|
||||
virtual void DoSetBitmap(const wxBitmap& WXUNUSED(bitmap),
|
||||
State WXUNUSED(which))
|
||||
{ }
|
||||
|
||||
virtual wxSize DoGetBitmapMargins() const
|
||||
{ return wxSize(0, 0); }
|
||||
|
||||
virtual void DoSetBitmapMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
|
||||
{ }
|
||||
|
||||
virtual void DoSetBitmapPosition(wxDirection WXUNUSED(dir))
|
||||
{ }
|
||||
|
||||
virtual bool DoGetAuthNeeded() const { return false; }
|
||||
virtual void DoSetAuthNeeded(bool WXUNUSED(show)) { }
|
||||
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxAnyButtonBase);
|
||||
};
|
||||
|
||||
//#if defined(__WXUNIVERSAL__)
|
||||
// #include "wx/univ/anybutton.h"
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/anybutton.h"
|
||||
//#elif defined(__WXMOTIF__)
|
||||
// #include "wx/motif/anybutton.h"
|
||||
#elif defined(__WXGTK20__)
|
||||
#include "wx/gtk/anybutton.h"
|
||||
//#elif defined(__WXGTK__)
|
||||
// #include "wx/gtk1/anybutton.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/osx/anybutton.h"
|
||||
//#elif defined(__WXCOCOA__)
|
||||
// #include "wx/cocoa/anybutton.h"
|
||||
//#elif defined(__WXPM__)
|
||||
// #include "wx/os2/anybutton.h"
|
||||
//#elif defined(__WXPALMOS__)
|
||||
// #include "wx/palmos/anybutton.h"
|
||||
#else
|
||||
typedef wxAnyButtonBase wxAnyButton;
|
||||
#endif
|
||||
|
||||
#endif // wxHAS_ANY_BUTTON
|
||||
|
||||
#endif // _WX_ANYBUTTON_H_BASE_
|
@@ -502,18 +502,22 @@ protected:
|
||||
|
||||
|
||||
|
||||
class WXDLLIMPEXP_AUI wxAuiNotebook : public wxControl
|
||||
class WXDLLIMPEXP_AUI wxAuiNotebook : public wxNavigationEnabled<wxControl>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
wxAuiNotebook();
|
||||
wxAuiNotebook() { Init(); }
|
||||
|
||||
wxAuiNotebook(wxWindow* parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxAUI_NB_DEFAULT_STYLE);
|
||||
long style = wxAUI_NB_DEFAULT_STYLE)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, style);
|
||||
}
|
||||
|
||||
virtual ~wxAuiNotebook();
|
||||
|
||||
@@ -595,6 +599,9 @@ public:
|
||||
virtual void Thaw();
|
||||
|
||||
protected:
|
||||
// Common part of all ctors.
|
||||
void Init();
|
||||
|
||||
// choose the default border for this window
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
|
||||
@@ -627,6 +634,7 @@ protected:
|
||||
void OnTabBeginDrag(wxAuiNotebookEvent& evt);
|
||||
void OnTabDragMotion(wxAuiNotebookEvent& evt);
|
||||
void OnTabEndDrag(wxAuiNotebookEvent& evt);
|
||||
void OnTabCancelDrag(wxAuiNotebookEvent& evt);
|
||||
void OnTabButton(wxAuiNotebookEvent& evt);
|
||||
void OnTabMiddleDown(wxAuiNotebookEvent& evt);
|
||||
void OnTabMiddleUp(wxAuiNotebookEvent& evt);
|
||||
@@ -664,9 +672,6 @@ protected:
|
||||
DECLARE_CLASS(wxAuiNotebook)
|
||||
DECLARE_EVENT_TABLE()
|
||||
#endif
|
||||
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -14,44 +14,9 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton flags shared with other classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
|
||||
|
||||
// These flags affect label alignment
|
||||
#define wxBU_LEFT 0x0040
|
||||
#define wxBU_TOP 0x0080
|
||||
#define wxBU_RIGHT 0x0100
|
||||
#define wxBU_BOTTOM 0x0200
|
||||
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
|
||||
#endif
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton specific flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// These two flags are obsolete
|
||||
#define wxBU_NOAUTODRAW 0x0000
|
||||
#define wxBU_AUTODRAW 0x0004
|
||||
|
||||
// by default, the buttons will be created with some (system dependent)
|
||||
// minimal size to make them look nicer, giving this style will make them as
|
||||
// small as possible
|
||||
#define wxBU_EXACTFIT 0x0001
|
||||
|
||||
// this flag can be used to disable using the text label in the button: it is
|
||||
// mostly useful when creating buttons showing bitmap and having stock id as
|
||||
// without it both the standard label corresponding to the stock id and the
|
||||
// bitmap would be shown
|
||||
#define wxBU_NOTEXT 0x0002
|
||||
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/control.h"
|
||||
#include "wx/anybutton.h"
|
||||
|
||||
extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
|
||||
|
||||
@@ -59,7 +24,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
|
||||
// wxButton: a push button
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxButtonBase : public wxControl
|
||||
class WXDLLIMPEXP_CORE wxButtonBase : public wxAnyButton
|
||||
{
|
||||
public:
|
||||
wxButtonBase() { }
|
||||
@@ -70,132 +35,15 @@ public:
|
||||
void SetAuthNeeded(bool show = true) { DoSetAuthNeeded(show); }
|
||||
bool GetAuthNeeded() const { return DoGetAuthNeeded(); }
|
||||
|
||||
// show the image in the button in addition to the label: this method is
|
||||
// supported on all (major) platforms
|
||||
void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT)
|
||||
{
|
||||
SetBitmapLabel(bitmap);
|
||||
SetBitmapPosition(dir);
|
||||
}
|
||||
|
||||
wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); }
|
||||
|
||||
// Methods for setting individual images for different states: normal,
|
||||
// selected (meaning pushed or pressed), focused (meaning normal state for
|
||||
// a focused button), disabled or hover (a.k.a. hot or current).
|
||||
//
|
||||
// Remember that SetBitmap() itself must be called before any other
|
||||
// SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym
|
||||
// for it anyhow) and that all bitmaps passed to these functions should be
|
||||
// of the same size.
|
||||
void SetBitmapLabel(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Normal); }
|
||||
void SetBitmapPressed(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Pressed); }
|
||||
void SetBitmapDisabled(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Disabled); }
|
||||
void SetBitmapCurrent(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Current); }
|
||||
void SetBitmapFocus(const wxBitmap& bitmap)
|
||||
{ DoSetBitmap(bitmap, State_Focused); }
|
||||
|
||||
wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); }
|
||||
wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); }
|
||||
wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); }
|
||||
wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); }
|
||||
wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); }
|
||||
|
||||
|
||||
// set the margins around the image
|
||||
void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); }
|
||||
void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); }
|
||||
wxSize GetBitmapMargins() { return DoGetBitmapMargins(); }
|
||||
|
||||
// set the image position relative to the text, i.e. wxLEFT means that the
|
||||
// image is to the left of the text (this is the default)
|
||||
void SetBitmapPosition(wxDirection dir);
|
||||
|
||||
|
||||
// make this button the default button in its top level window
|
||||
//
|
||||
// returns the old default item (possibly NULL)
|
||||
virtual wxWindow *SetDefault();
|
||||
|
||||
// Buttons on MSW can look bad if they are not native colours, because
|
||||
// then they become owner-drawn and not theme-drawn. Disable it here
|
||||
// in wxButtonBase to make it consistent.
|
||||
virtual bool ShouldInheritColours() const { return false; }
|
||||
|
||||
// returns the default button size for this platform
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
// wxUniv-compatible and deprecated equivalents to SetBitmapXXX()
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
void SetImageLabel(const wxBitmap& bitmap) { SetBitmap(bitmap); }
|
||||
void SetImageMargins(wxCoord x, wxCoord y) { SetBitmapMargins(x, y); }
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
// backwards compatible names for pressed/current bitmaps: they're not
|
||||
// deprecated as there is nothing really wrong with using them and no real
|
||||
// advantage to using the new names but the new names are still preferred
|
||||
wxBitmap GetBitmapSelected() const { return GetBitmapPressed(); }
|
||||
wxBitmap GetBitmapHover() const { return GetBitmapCurrent(); }
|
||||
|
||||
void SetBitmapSelected(const wxBitmap& bitmap) { SetBitmapPressed(bitmap); }
|
||||
void SetBitmapHover(const wxBitmap& bitmap) { SetBitmapCurrent(bitmap); }
|
||||
|
||||
|
||||
// this enum is not part of wx public API, it is public because it is used
|
||||
// in non wxButton-derived classes internally
|
||||
//
|
||||
// also notice that MSW code relies on the values of the enum elements, do
|
||||
// not change them without revising src/msw/button.cpp
|
||||
enum State
|
||||
{
|
||||
State_Normal,
|
||||
State_Current, // a.k.a. hot or "hovering"
|
||||
State_Pressed, // a.k.a. "selected" in public API for some reason
|
||||
State_Disabled,
|
||||
State_Focused,
|
||||
State_Max
|
||||
};
|
||||
|
||||
// return true if this button shouldn't show the text label, either because
|
||||
// it doesn't have it or because it was explicitly disabled with wxBU_NOTEXT
|
||||
bool DontShowLabel() const
|
||||
{
|
||||
return HasFlag(wxBU_NOTEXT) || GetLabel().empty();
|
||||
}
|
||||
|
||||
// return true if we do show the label
|
||||
bool ShowsLabel() const
|
||||
{
|
||||
return !DontShowLabel();
|
||||
}
|
||||
|
||||
protected:
|
||||
// choose the default border for this window
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
|
||||
virtual bool DoGetAuthNeeded() const { return false; }
|
||||
virtual void DoSetAuthNeeded(bool WXUNUSED(show)) { }
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State WXUNUSED(which)) const
|
||||
{ return wxBitmap(); }
|
||||
virtual void DoSetBitmap(const wxBitmap& WXUNUSED(bitmap),
|
||||
State WXUNUSED(which))
|
||||
{ }
|
||||
|
||||
virtual wxSize DoGetBitmapMargins() const
|
||||
{ return wxSize(0, 0); }
|
||||
|
||||
virtual void DoSetBitmapMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
|
||||
{ }
|
||||
|
||||
virtual void DoSetBitmapPosition(wxDirection WXUNUSED(dir))
|
||||
{ }
|
||||
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxButtonBase);
|
||||
};
|
||||
|
||||
@@ -221,5 +69,4 @@ protected:
|
||||
|
||||
#endif // wxUSE_BUTTON
|
||||
|
||||
#endif
|
||||
// _WX_BUTTON_H_BASE_
|
||||
#endif // _WX_BUTTON_H_BASE_
|
||||
|
@@ -132,11 +132,12 @@ public:
|
||||
wxDL_VOIDMETHOD_DEFINE( cairo_translate,
|
||||
(cairo_t *cr, double tx, double ty), (cr, tx, ty) )
|
||||
|
||||
#if wxUSE_PANGO
|
||||
wxDL_VOIDMETHOD_DEFINE( pango_cairo_update_layout,
|
||||
(cairo_t *cr, PangoLayout *layout), (cr, layout) )
|
||||
wxDL_VOIDMETHOD_DEFINE( pango_cairo_show_layout,
|
||||
(cairo_t *cr, PangoLayout *layout), (cr, layout) )
|
||||
|
||||
#endif
|
||||
wxDECLARE_NO_COPY_CLASS(wxCairoLibrary);
|
||||
};
|
||||
|
||||
|
@@ -112,10 +112,10 @@ public:
|
||||
void SetHoliday(bool holiday) { m_holiday = holiday; }
|
||||
|
||||
// accessors
|
||||
bool HasTextColour() const { return m_colText.Ok(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.Ok(); }
|
||||
bool HasBorderColour() const { return m_colBorder.Ok(); }
|
||||
bool HasFont() const { return m_font.Ok(); }
|
||||
bool HasTextColour() const { return m_colText.IsOk(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
|
||||
bool HasBorderColour() const { return m_colBorder.IsOk(); }
|
||||
bool HasFont() const { return m_font.IsOk(); }
|
||||
bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
|
||||
|
||||
bool IsHoliday() const { return m_holiday; }
|
||||
|
@@ -189,7 +189,7 @@ public:
|
||||
|
||||
// Is this data OK for showing the print dialog?
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_printData.Ok() ; }
|
||||
bool IsOk() const { return m_printData.IsOk() ; }
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
|
||||
// Is this data OK for showing the page setup dialog?
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_printData.Ok() ; }
|
||||
bool IsOk() const { return m_printData.IsOk() ; }
|
||||
|
||||
// If a corresponding paper type is found in the paper database, will set the m_printData
|
||||
// paper size id member as well.
|
||||
|
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/containr.h
|
||||
// Purpose: wxControlContainer class declration: a "mix-in" class which
|
||||
// implements the TAB navigation between the controls
|
||||
// Purpose: wxControlContainer and wxNavigationEnabled declarations
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 06.08.01
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Copyright: (c) 2001, 2011 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -19,12 +18,11 @@ class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindowBase;
|
||||
|
||||
/*
|
||||
Implementation note: wxControlContainer is not a real mix-in but rather
|
||||
a class meant to be aggregated with (and not inherited from). Although
|
||||
logically it should be a mix-in, doing it like this has no advantage from
|
||||
the point of view of the existing code but does have some problems (we'd
|
||||
need to play tricks with event handlers which may be difficult to do
|
||||
safely). The price we pay for this simplicity is the ugly macros below.
|
||||
This header declares wxControlContainer class however it's not a real
|
||||
container of controls but rather just a helper used to implement TAB
|
||||
navigation among the window children. You should rarely need to use it
|
||||
directly, derive from the documented public wxNavigationEnabled<> class to
|
||||
implement TAB navigation in a custom composite window.
|
||||
*/
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -102,6 +100,164 @@ private:
|
||||
bool m_inSetFocus;
|
||||
};
|
||||
|
||||
#ifdef wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxControlContainer for native TAB navigation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// this must be a real class as we forward-declare it elsewhere
|
||||
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
|
||||
{
|
||||
protected:
|
||||
// set the focus to the child which had it the last time
|
||||
virtual bool SetFocusToChild();
|
||||
};
|
||||
|
||||
#else // !wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxControlContainer for TAB navigation implemented in wx itself
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
|
||||
{
|
||||
public:
|
||||
// default ctor, SetContainerWindow() must be called later
|
||||
wxControlContainer();
|
||||
|
||||
// the methods to be called from the window event handlers
|
||||
void HandleOnNavigationKey(wxNavigationKeyEvent& event);
|
||||
void HandleOnFocus(wxFocusEvent& event);
|
||||
void HandleOnWindowDestroy(wxWindowBase *child);
|
||||
|
||||
// called from OnChildFocus() handler, i.e. when one of our (grand)
|
||||
// children gets the focus
|
||||
void SetLastFocus(wxWindow *win);
|
||||
|
||||
protected:
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxControlContainer);
|
||||
};
|
||||
|
||||
#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
|
||||
// this function is for wxWidgets internal use only
|
||||
extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNavigationEnabled: Derive from this class to support keyboard navigation
|
||||
// among window children in a wxWindow-derived class. The details of this class
|
||||
// don't matter, you just need to derive from it to make navigation work.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// The template parameter W must be a wxWindow-derived class.
|
||||
template <class W>
|
||||
class wxNavigationEnabled : public W
|
||||
{
|
||||
public:
|
||||
typedef W BaseWindowClass;
|
||||
|
||||
wxNavigationEnabled()
|
||||
{
|
||||
m_container.SetContainerWindow(this);
|
||||
|
||||
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
Connect(wxEVT_NAVIGATION_KEY,
|
||||
wxNavigationKeyEventHandler(wxNavigationEnabled::OnNavigationKey));
|
||||
|
||||
Connect(wxEVT_SET_FOCUS,
|
||||
wxFocusEventHandler(wxNavigationEnabled::OnFocus));
|
||||
|
||||
Connect(wxEVT_CHILD_FOCUS,
|
||||
wxChildFocusEventHandler(wxNavigationEnabled::OnChildFocus));
|
||||
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
}
|
||||
|
||||
virtual bool AcceptsFocus() const
|
||||
{
|
||||
return m_container.AcceptsFocus();
|
||||
}
|
||||
|
||||
virtual bool AcceptsFocusRecursively() const
|
||||
{
|
||||
return m_container.AcceptsFocusRecursively();
|
||||
}
|
||||
|
||||
virtual bool AcceptsFocusFromKeyboard() const
|
||||
{
|
||||
return m_container.AcceptsFocusFromKeyboard();
|
||||
}
|
||||
|
||||
virtual void AddChild(wxWindowBase *child)
|
||||
{
|
||||
BaseWindowClass::AddChild(child);
|
||||
|
||||
m_container.UpdateCanFocus();
|
||||
}
|
||||
|
||||
virtual void RemoveChild(wxWindowBase *child)
|
||||
{
|
||||
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
m_container.HandleOnWindowDestroy(child);
|
||||
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
|
||||
BaseWindowClass::RemoveChild(child);
|
||||
|
||||
m_container.UpdateCanFocus();
|
||||
}
|
||||
|
||||
virtual void SetFocus()
|
||||
{
|
||||
if ( !m_container.DoSetFocus() )
|
||||
BaseWindowClass::SetFocus();
|
||||
}
|
||||
|
||||
void SetFocusIgnoringChildren()
|
||||
{
|
||||
BaseWindowClass::SetFocus();
|
||||
}
|
||||
|
||||
void AcceptFocus(bool acceptFocus)
|
||||
{
|
||||
m_container.SetCanFocus(acceptFocus);
|
||||
}
|
||||
|
||||
protected:
|
||||
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
void OnNavigationKey(wxNavigationKeyEvent& event)
|
||||
{
|
||||
m_container.HandleOnNavigationKey(event);
|
||||
}
|
||||
|
||||
void OnFocus(wxFocusEvent& event)
|
||||
{
|
||||
m_container.HandleOnFocus(event);
|
||||
}
|
||||
|
||||
void OnChildFocus(wxChildFocusEvent& event)
|
||||
{
|
||||
m_container.SetLastFocus(event.GetWindow());
|
||||
event.Skip();
|
||||
}
|
||||
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
|
||||
wxControlContainer m_container;
|
||||
|
||||
|
||||
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxNavigationEnabled, W);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Compatibility macros from now on, do NOT use them and preferably do not even
|
||||
// look at them.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
// common part of WX_DECLARE_CONTROL_CONTAINER in the native and generic cases,
|
||||
// it should be used in the wxWindow-derived class declaration
|
||||
#define WX_DECLARE_CONTROL_CONTAINER_BASE() \
|
||||
@@ -156,20 +312,9 @@ protected: \
|
||||
return m_container.AcceptsFocusFromKeyboard(); \
|
||||
}
|
||||
|
||||
|
||||
#ifdef wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxControlContainer for native TAB navigation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// this must be a real class as we forward-declare it elsewhere
|
||||
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
|
||||
{
|
||||
protected:
|
||||
// set the focus to the child which had it the last time
|
||||
virtual bool SetFocusToChild();
|
||||
};
|
||||
|
||||
#define WX_EVENT_TABLE_CONTROL_CONTAINER(classname)
|
||||
|
||||
#define WX_DECLARE_CONTROL_CONTAINER WX_DECLARE_CONTROL_CONTAINER_BASE
|
||||
@@ -191,38 +336,6 @@ protected:
|
||||
|
||||
#else // !wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxControlContainer for TAB navigation implemented in wx itself
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxControlContainer : public wxControlContainerBase
|
||||
{
|
||||
public:
|
||||
// default ctor, SetContainerWindow() must be called later
|
||||
wxControlContainer();
|
||||
|
||||
// the methods to be called from the window event handlers
|
||||
void HandleOnNavigationKey(wxNavigationKeyEvent& event);
|
||||
void HandleOnFocus(wxFocusEvent& event);
|
||||
void HandleOnWindowDestroy(wxWindowBase *child);
|
||||
|
||||
// called from OnChildFocus() handler, i.e. when one of our (grand)
|
||||
// children gets the focus
|
||||
void SetLastFocus(wxWindow *win);
|
||||
|
||||
protected:
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxControlContainer);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros which may be used by the classes wishing to implement TAB navigation
|
||||
// among their children
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// declare the methods to be forwarded
|
||||
#define WX_DECLARE_CONTROL_CONTAINER() \
|
||||
WX_DECLARE_CONTROL_CONTAINER_BASE(); \
|
||||
@@ -274,7 +387,6 @@ public: \
|
||||
|
||||
#endif // wxHAS_NATIVE_TAB_TRAVERSAL/!wxHAS_NATIVE_TAB_TRAVERSAL
|
||||
|
||||
// this function is for wxWidgets internal use only
|
||||
extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
|
||||
#endif // WXWIN_COMPATIBILITY_2_8
|
||||
|
||||
#endif // _WX_CONTAINR_H_
|
||||
|
@@ -163,7 +163,7 @@ public:
|
||||
void SetItalic( bool set ) { m_italic = set; }
|
||||
|
||||
// accessors
|
||||
bool HasColour() const { return m_colour.Ok(); }
|
||||
bool HasColour() const { return m_colour.IsOk(); }
|
||||
const wxColour& GetColour() const { return m_colour; }
|
||||
|
||||
bool HasFont() const { return m_bold || m_italic; }
|
||||
@@ -701,6 +701,12 @@ public:
|
||||
virtual void HitTest( const wxPoint & point, wxDataViewItem &item, wxDataViewColumn* &column ) const = 0;
|
||||
virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const = 0;
|
||||
|
||||
virtual bool SetRowHeight( int WXUNUSED(rowHeight) ) { return false; }
|
||||
|
||||
virtual void StartEditor( const wxDataViewItem & WXUNUSED(item),
|
||||
unsigned int WXUNUSED(column) )
|
||||
{ }
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
virtual bool EnableDragSource(const wxDataFormat& WXUNUSED(format))
|
||||
{ return false; }
|
||||
@@ -757,7 +763,8 @@ public:
|
||||
m_column(NULL),
|
||||
m_pos(-1,-1),
|
||||
m_cacheFrom(0),
|
||||
m_cacheTo(0)
|
||||
m_cacheTo(0),
|
||||
m_editCancelled(false)
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
, m_dataObject(NULL),
|
||||
m_dataBuffer(NULL),
|
||||
@@ -774,7 +781,8 @@ public:
|
||||
m_column(event.m_column),
|
||||
m_pos(event.m_pos),
|
||||
m_cacheFrom(event.m_cacheFrom),
|
||||
m_cacheTo(event.m_cacheTo)
|
||||
m_cacheTo(event.m_cacheTo),
|
||||
m_editCancelled(event.m_editCancelled)
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
, m_dataObject(event.m_dataObject),
|
||||
m_dataFormat(event.m_dataFormat),
|
||||
@@ -795,6 +803,10 @@ public:
|
||||
const wxVariant &GetValue() const { return m_value; }
|
||||
void SetValue( const wxVariant &value ) { m_value = value; }
|
||||
|
||||
// for wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE only
|
||||
bool IsEditCancelled() const { return m_editCancelled; }
|
||||
void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
|
||||
|
||||
// for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
|
||||
void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
|
||||
wxDataViewColumn *GetDataViewColumn() const { return m_column; }
|
||||
@@ -834,6 +846,7 @@ protected:
|
||||
wxPoint m_pos;
|
||||
int m_cacheFrom;
|
||||
int m_cacheTo;
|
||||
bool m_editCancelled;
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
wxDataObject *m_dataObject;
|
||||
|
@@ -512,6 +512,19 @@ public:
|
||||
// this needs to overidden if the axis is inverted
|
||||
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Native Windows functions using the underlying HDC don't honour GDI+
|
||||
// transformations which may be applied to it. Using this function we can
|
||||
// transform the coordinates manually before passing them to such functions
|
||||
// (as in e.g. wxRendererMSW code). It doesn't do anything if this is not a
|
||||
// wxGCDC.
|
||||
virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const
|
||||
{
|
||||
return r;
|
||||
}
|
||||
#endif // __WXMSW__
|
||||
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// the actual drawing API
|
||||
|
||||
@@ -1344,13 +1357,13 @@ public:
|
||||
|
||||
~wxDCTextColourChanger()
|
||||
{
|
||||
if ( m_colFgOld.Ok() )
|
||||
if ( m_colFgOld.IsOk() )
|
||||
m_dc.SetTextForeground(m_colFgOld);
|
||||
}
|
||||
|
||||
void Set(const wxColour& col)
|
||||
{
|
||||
if ( !m_colFgOld.Ok() )
|
||||
if ( !m_colFgOld.IsOk() )
|
||||
m_colFgOld = m_dc.GetTextForeground();
|
||||
m_dc.SetTextForeground(col);
|
||||
}
|
||||
@@ -1378,7 +1391,7 @@ public:
|
||||
|
||||
~wxDCPenChanger()
|
||||
{
|
||||
if ( m_penOld.Ok() )
|
||||
if ( m_penOld.IsOk() )
|
||||
m_dc.SetPen(m_penOld);
|
||||
}
|
||||
|
||||
@@ -1405,7 +1418,7 @@ public:
|
||||
|
||||
~wxDCBrushChanger()
|
||||
{
|
||||
if ( m_brushOld.Ok() )
|
||||
if ( m_brushOld.IsOk() )
|
||||
m_dc.SetBrush(m_brushOld);
|
||||
}
|
||||
|
||||
@@ -1461,14 +1474,14 @@ public:
|
||||
|
||||
void Set(const wxFont& font)
|
||||
{
|
||||
if ( !m_fontOld.Ok() )
|
||||
if ( !m_fontOld.IsOk() )
|
||||
m_fontOld = m_dc.GetFont();
|
||||
m_dc.SetFont(font);
|
||||
}
|
||||
|
||||
~wxDCFontChanger()
|
||||
{
|
||||
if ( m_fontOld.Ok() )
|
||||
if ( m_fontOld.IsOk() )
|
||||
m_dc.SetFont(m_fontOld);
|
||||
}
|
||||
|
||||
|
@@ -28,11 +28,14 @@ public:
|
||||
wxGCDC( const wxMemoryDC& dc );
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
wxGCDC( const wxPrinterDC& dc );
|
||||
#endif
|
||||
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
|
||||
wxGCDC( const wxEnhMetaFileDC& dc );
|
||||
#endif
|
||||
wxGCDC();
|
||||
virtual ~wxGCDC();
|
||||
|
||||
wxGraphicsContext* GetGraphicsContext();
|
||||
wxGraphicsContext* GetGraphicsContext() const;
|
||||
void SetGraphicsContext( wxGraphicsContext* ctx );
|
||||
|
||||
#ifdef __WXMSW__
|
||||
@@ -55,6 +58,9 @@ public:
|
||||
wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc );
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc );
|
||||
#endif
|
||||
#if defined(__WXMSW__) && wxUSE_ENH_METAFILE
|
||||
wxGCDCImpl( wxDC *owner, const wxEnhMetaFileDC& dc );
|
||||
#endif
|
||||
wxGCDCImpl( wxDC *owner );
|
||||
|
||||
@@ -103,7 +109,7 @@ public:
|
||||
|
||||
virtual void ComputeScaleAndOrigin();
|
||||
|
||||
wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
|
||||
wxGraphicsContext* GetGraphicsContext() const { return m_graphicContext; }
|
||||
virtual void SetGraphicsContext( wxGraphicsContext* ctx );
|
||||
|
||||
// the true implementations
|
||||
@@ -193,6 +199,10 @@ public:
|
||||
|
||||
virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
|
||||
|
||||
#ifdef __WXMSW__
|
||||
virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const;
|
||||
#endif // __WXMSW__
|
||||
|
||||
protected:
|
||||
// scaling variables
|
||||
bool m_logicalFunctionSupported;
|
||||
|
@@ -1162,7 +1162,13 @@ typedef wxUint32 wxDword;
|
||||
Define signed and unsigned integral types big enough to contain all of long,
|
||||
size_t and void *.
|
||||
*/
|
||||
#if SIZEOF_SIZE_T >= SIZEOF_VOID_P
|
||||
#if SIZEOF_LONG >= SIZEOF_VOID_P
|
||||
/*
|
||||
Normal case when long is the largest integral type.
|
||||
*/
|
||||
typedef long wxIntPtr;
|
||||
typedef unsigned long wxUIntPtr;
|
||||
#elif SIZEOF_SIZE_T >= SIZEOF_VOID_P
|
||||
/*
|
||||
Win64 case: size_t is the only integral type big enough for "void *".
|
||||
|
||||
@@ -1172,12 +1178,6 @@ typedef wxUint32 wxDword;
|
||||
*/
|
||||
typedef wxW64 ssize_t wxIntPtr;
|
||||
typedef size_t wxUIntPtr;
|
||||
#elif SIZEOF_LONG >= SIZEOF_VOID_P
|
||||
/*
|
||||
Normal case when long is the largest integral type.
|
||||
*/
|
||||
typedef long wxIntPtr;
|
||||
typedef unsigned long wxUIntPtr;
|
||||
#else
|
||||
/*
|
||||
This should never happen for the current architectures but if you're
|
||||
|
@@ -22,14 +22,25 @@
|
||||
#elif defined(__WINDOWS__)
|
||||
/*
|
||||
__declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
|
||||
as VC++ and gcc
|
||||
as VC++.
|
||||
*/
|
||||
# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
|
||||
# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
|
||||
# define WXEXPORT __declspec(dllexport)
|
||||
# define WXIMPORT __declspec(dllimport)
|
||||
# else /* compiler doesn't support __declspec() */
|
||||
# define WXEXPORT
|
||||
# define WXIMPORT
|
||||
/*
|
||||
While gcc also supports __declspec(dllexport), it creates unusably huge
|
||||
DLL files since gcc 4.5 (while taking horribly long amounts of time),
|
||||
see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601. Because of this
|
||||
we rely on binutils auto export/import support which seems to work
|
||||
quite well for 4.5+.
|
||||
*/
|
||||
# elif defined(__GNUC__) && !wxCHECK_GCC_VERSION(4, 5)
|
||||
/*
|
||||
__declspec could be used here too but let's use the native
|
||||
__attribute__ instead for clarity.
|
||||
*/
|
||||
# define WXEXPORT __attribute__((dllexport))
|
||||
# define WXIMPORT __attribute__((dllimport))
|
||||
# endif
|
||||
#elif defined(__WXPM__)
|
||||
# if defined (__WATCOMC__)
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#if wxUSE_DOC_VIEW_ARCHITECTURE
|
||||
|
||||
#include "wx/list.h"
|
||||
#include "wx/dlist.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/filehistory.h"
|
||||
@@ -172,6 +173,10 @@ public:
|
||||
// dialogs. Override if necessary.
|
||||
virtual wxWindow *GetDocumentWindow() const;
|
||||
|
||||
// Returns true if this document is a child document corresponding to a
|
||||
// part of the parent document and not a disk file as usual.
|
||||
bool IsChildDocument() const { return m_documentParent != NULL; }
|
||||
|
||||
protected:
|
||||
wxList m_documentViews;
|
||||
wxString m_documentFile;
|
||||
@@ -179,7 +184,12 @@ protected:
|
||||
wxString m_documentTypeName;
|
||||
wxDocTemplate* m_documentTemplate;
|
||||
bool m_documentModified;
|
||||
|
||||
// if the document parent is non-NULL, it's a pseudo-document corresponding
|
||||
// to a part of the parent document which can't be saved or loaded
|
||||
// independently of its parent and is always closed when its parent is
|
||||
wxDocument* m_documentParent;
|
||||
|
||||
wxCommandProcessor* m_commandProcessor;
|
||||
bool m_savedYet;
|
||||
|
||||
@@ -193,6 +203,10 @@ protected:
|
||||
wxString DoGetUserReadableName() const;
|
||||
|
||||
private:
|
||||
// list of all documents whose m_documentParent is this one
|
||||
typedef wxDList<wxDocument> DocsList;
|
||||
DocsList m_childDocuments;
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxDocument)
|
||||
wxDECLARE_NO_COPY_CLASS(wxDocument);
|
||||
};
|
||||
@@ -386,6 +400,7 @@ public:
|
||||
void OnUpdateFileRevert(wxUpdateUIEvent& event);
|
||||
void OnUpdateFileNew(wxUpdateUIEvent& event);
|
||||
void OnUpdateFileSave(wxUpdateUIEvent& event);
|
||||
void OnUpdateFileSaveAs(wxUpdateUIEvent& event);
|
||||
void OnUpdateUndo(wxUpdateUIEvent& event);
|
||||
void OnUpdateRedo(wxUpdateUIEvent& event);
|
||||
|
||||
@@ -474,6 +489,13 @@ public:
|
||||
// Get the current document manager
|
||||
static wxDocManager* GetDocumentManager() { return sm_docManager; }
|
||||
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
wxPageSetupDialogData& GetPageSetupDialogData()
|
||||
{ return m_pageSetupDialogData; }
|
||||
const wxPageSetupDialogData& GetPageSetupDialogData() const
|
||||
{ return m_pageSetupDialogData; }
|
||||
#endif // wxUSE_PRINTING_ARCHITECTURE
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
// deprecated, override GetDefaultName() instead
|
||||
wxDEPRECATED_BUT_USED_INTERNALLY(
|
||||
@@ -488,6 +510,11 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
// Called when a file selected from the MRU list doesn't exist any more.
|
||||
// The default behaviour is to remove the file from the MRU and notify the
|
||||
// user about it but this method can be overridden to customize it.
|
||||
virtual void OnMRUFileNotExist(unsigned n, const wxString& filename);
|
||||
|
||||
// Open the MRU file with the given index in our associated file history.
|
||||
void DoOpenMRUFile(unsigned n);
|
||||
#if wxUSE_PRINTING_ARCHITECTURE
|
||||
|
@@ -615,8 +615,9 @@ extern WXDLLIMPEXP_BASE const wxEventType wxEVT_FIRST;
|
||||
extern WXDLLIMPEXP_BASE const wxEventType wxEVT_USER_FIRST;
|
||||
|
||||
// Need events declared to do this
|
||||
class WXDLLIMPEXP_FWD_BASE wxIdleEvent;
|
||||
class WXDLLIMPEXP_FWD_BASE wxThreadEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxThreadEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxMouseEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxChildFocusEvent;
|
||||
@@ -649,7 +650,6 @@ class WXDLLIMPEXP_FWD_CORE wxPaletteChangedEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxJoystickEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxDropFilesEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxInitDialogEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxIdleEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxUpdateUIEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxClipboardTextEvent;
|
||||
class WXDLLIMPEXP_FWD_CORE wxHelpEvent;
|
||||
@@ -678,7 +678,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_DROPDOWN, wxCo
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_CLOSEUP, wxCommandEvent);
|
||||
|
||||
// Thread events
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_THREAD, wxThreadEvent);
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_THREAD, wxThreadEvent);
|
||||
|
||||
// Mouse event types
|
||||
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DOWN, wxMouseEvent);
|
||||
@@ -1116,6 +1116,148 @@ private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxEventProcessInHandlerOnly);
|
||||
};
|
||||
|
||||
|
||||
class WXDLLIMPEXP_BASE wxEventBasicPayloadMixin
|
||||
{
|
||||
public:
|
||||
wxEventBasicPayloadMixin()
|
||||
: m_commandInt(0),
|
||||
m_extraLong(0)
|
||||
{
|
||||
}
|
||||
|
||||
void SetString(const wxString& s) { m_cmdString = s; }
|
||||
const wxString& GetString() const { return m_cmdString; }
|
||||
|
||||
void SetInt(int i) { m_commandInt = i; }
|
||||
int GetInt() const { return m_commandInt; }
|
||||
|
||||
void SetExtraLong(long extraLong) { m_extraLong = extraLong; }
|
||||
long GetExtraLong() const { return m_extraLong; }
|
||||
|
||||
protected:
|
||||
// Note: these variables have "cmd" or "command" in their name for backward compatibility:
|
||||
// they used to be part of wxCommandEvent, not this mixin.
|
||||
wxString m_cmdString; // String event argument
|
||||
int m_commandInt;
|
||||
long m_extraLong; // Additional information (e.g. select/deselect)
|
||||
|
||||
wxDECLARE_NO_ASSIGN_CLASS(wxEventBasicPayloadMixin);
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxEventAnyPayloadMixin : public wxEventBasicPayloadMixin
|
||||
{
|
||||
public:
|
||||
wxEventAnyPayloadMixin() : wxEventBasicPayloadMixin() {}
|
||||
|
||||
#if wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
|
||||
template<typename T>
|
||||
void SetPayload(const T& payload)
|
||||
{
|
||||
m_payload = payload;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T GetPayload() const
|
||||
{
|
||||
return m_payload.As<T>();
|
||||
}
|
||||
|
||||
protected:
|
||||
wxAny m_payload;
|
||||
#endif // wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
|
||||
|
||||
wxDECLARE_NO_ASSIGN_CLASS(wxEventBasicPayloadMixin);
|
||||
};
|
||||
|
||||
|
||||
// Idle event
|
||||
/*
|
||||
wxEVT_IDLE
|
||||
*/
|
||||
|
||||
// Whether to always send idle events to windows, or
|
||||
// to only send update events to those with the
|
||||
// wxWS_EX_PROCESS_IDLE style.
|
||||
|
||||
enum wxIdleMode
|
||||
{
|
||||
// Send idle events to all windows
|
||||
wxIDLE_PROCESS_ALL,
|
||||
|
||||
// Send idle events to windows that have
|
||||
// the wxWS_EX_PROCESS_IDLE flag specified
|
||||
wxIDLE_PROCESS_SPECIFIED
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxIdleEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
wxIdleEvent()
|
||||
: wxEvent(0, wxEVT_IDLE),
|
||||
m_requestMore(false)
|
||||
{ }
|
||||
wxIdleEvent(const wxIdleEvent& event)
|
||||
: wxEvent(event),
|
||||
m_requestMore(event.m_requestMore)
|
||||
{ }
|
||||
|
||||
void RequestMore(bool needMore = true) { m_requestMore = needMore; }
|
||||
bool MoreRequested() const { return m_requestMore; }
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxIdleEvent(*this); }
|
||||
|
||||
// Specify how wxWidgets will send idle events: to
|
||||
// all windows, or only to those which specify that they
|
||||
// will process the events.
|
||||
static void SetMode(wxIdleMode mode) { sm_idleMode = mode; }
|
||||
|
||||
// Returns the idle event mode
|
||||
static wxIdleMode GetMode() { return sm_idleMode; }
|
||||
|
||||
protected:
|
||||
bool m_requestMore;
|
||||
static wxIdleMode sm_idleMode;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent)
|
||||
};
|
||||
|
||||
|
||||
// Thread event
|
||||
|
||||
class WXDLLIMPEXP_BASE wxThreadEvent : public wxEvent,
|
||||
public wxEventAnyPayloadMixin
|
||||
{
|
||||
public:
|
||||
wxThreadEvent(wxEventType eventType = wxEVT_THREAD, int id = wxID_ANY)
|
||||
: wxEvent(id, eventType)
|
||||
{ }
|
||||
|
||||
wxThreadEvent(const wxThreadEvent& event)
|
||||
: wxEvent(event),
|
||||
wxEventAnyPayloadMixin(event)
|
||||
{
|
||||
// make sure our string member (which uses COW, aka refcounting) is not
|
||||
// shared by other wxString instances:
|
||||
SetString(GetString().c_str());
|
||||
}
|
||||
|
||||
virtual wxEvent *Clone() const
|
||||
{
|
||||
return new wxThreadEvent(*this);
|
||||
}
|
||||
|
||||
// this is important to avoid that calling wxEventLoopBase::YieldFor thread events
|
||||
// gets processed when this is unwanted:
|
||||
virtual wxEventCategory GetEventCategory() const
|
||||
{ return wxEVT_CATEGORY_THREAD; }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxThreadEvent)
|
||||
};
|
||||
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
|
||||
@@ -1138,16 +1280,15 @@ private:
|
||||
wxEVT_COMMAND_TOGGLEBUTTON_CLICKED
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent
|
||||
class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent,
|
||||
public wxEventBasicPayloadMixin
|
||||
{
|
||||
public:
|
||||
wxCommandEvent(wxEventType commandType = wxEVT_NULL, int winid = 0);
|
||||
|
||||
wxCommandEvent(const wxCommandEvent& event)
|
||||
: wxEvent(event),
|
||||
m_cmdString(event.m_cmdString),
|
||||
m_commandInt(event.m_commandInt),
|
||||
m_extraLong(event.m_extraLong),
|
||||
wxEventBasicPayloadMixin(event),
|
||||
m_clientData(event.m_clientData),
|
||||
m_clientObject(event.m_clientObject)
|
||||
{ }
|
||||
@@ -1160,32 +1301,23 @@ public:
|
||||
void SetClientObject(wxClientData* clientObject) { m_clientObject = clientObject; }
|
||||
wxClientData *GetClientObject() const { return m_clientObject; }
|
||||
|
||||
// Note: this shadows wxEventBasicPayloadMixin::GetString(), because it does some
|
||||
// GUI-specific hacks
|
||||
wxString GetString() const;
|
||||
|
||||
// Get listbox selection if single-choice
|
||||
int GetSelection() const { return m_commandInt; }
|
||||
|
||||
// Set/Get listbox/choice selection string
|
||||
void SetString(const wxString& s) { m_cmdString = s; }
|
||||
wxString GetString() const;
|
||||
|
||||
// Get checkbox value
|
||||
bool IsChecked() const { return m_commandInt != 0; }
|
||||
|
||||
// true if the listbox event was a selection.
|
||||
bool IsSelection() const { return (m_extraLong != 0); }
|
||||
|
||||
void SetExtraLong(long extraLong) { m_extraLong = extraLong; }
|
||||
long GetExtraLong() const { return m_extraLong; }
|
||||
|
||||
void SetInt(int i) { m_commandInt = i; }
|
||||
int GetInt() const { return m_commandInt; }
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
|
||||
virtual wxEventCategory GetEventCategory() const { return wxEVT_CATEGORY_USER_INPUT; }
|
||||
|
||||
protected:
|
||||
wxString m_cmdString; // String event argument
|
||||
int m_commandInt;
|
||||
long m_extraLong; // Additional information (e.g. select/deselect)
|
||||
void* m_clientData; // Arbitrary client data
|
||||
wxClientData* m_clientObject; // Arbitrary client object
|
||||
|
||||
@@ -1225,60 +1357,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
// Thread event
|
||||
|
||||
class WXDLLIMPEXP_CORE wxThreadEvent : public wxCommandEvent
|
||||
{
|
||||
public:
|
||||
wxThreadEvent(wxEventType eventType = wxEVT_COMMAND_THREAD, int id = wxID_ANY)
|
||||
: wxCommandEvent(eventType, id)
|
||||
{ }
|
||||
|
||||
wxThreadEvent(const wxThreadEvent& event)
|
||||
: wxCommandEvent(event)
|
||||
{
|
||||
// make sure our string member (which uses COW, aka refcounting) is not
|
||||
// shared by other wxString instances:
|
||||
SetString(GetString().c_str());
|
||||
|
||||
#if wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
|
||||
m_payload = event.m_payload;
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual wxEvent *Clone() const
|
||||
{
|
||||
return new wxThreadEvent(*this);
|
||||
}
|
||||
|
||||
// this is important to avoid that calling wxEventLoopBase::YieldFor thread events
|
||||
// gets processed when this is unwanted:
|
||||
virtual wxEventCategory GetEventCategory() const
|
||||
{ return wxEVT_CATEGORY_THREAD; }
|
||||
|
||||
#if wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
|
||||
template<typename T>
|
||||
void SetPayload(const T& payload)
|
||||
{
|
||||
m_payload = payload;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T GetPayload() const
|
||||
{
|
||||
return m_payload.As<T>();
|
||||
}
|
||||
|
||||
protected:
|
||||
wxAny m_payload;
|
||||
#endif // wxUSE_ANY && (!defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(7))
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxThreadEvent)
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Scroll event class, derived form wxCommandEvent. wxScrollEvents are
|
||||
// sent by wxSlider and wxScrollBar.
|
||||
/*
|
||||
@@ -1424,8 +1502,8 @@ public:
|
||||
bool LeftDClick() const { return (m_eventType == wxEVT_LEFT_DCLICK); }
|
||||
bool MiddleDClick() const { return (m_eventType == wxEVT_MIDDLE_DCLICK); }
|
||||
bool RightDClick() const { return (m_eventType == wxEVT_RIGHT_DCLICK); }
|
||||
bool Aux1DClick() const { return (m_eventType == wxEVT_AUX1_UP); }
|
||||
bool Aux2DClick() const { return (m_eventType == wxEVT_AUX2_UP); }
|
||||
bool Aux1DClick() const { return (m_eventType == wxEVT_AUX1_DCLICK); }
|
||||
bool Aux2DClick() const { return (m_eventType == wxEVT_AUX2_DCLICK); }
|
||||
|
||||
// True if a button is down and the mouse is moving
|
||||
bool Dragging() const
|
||||
@@ -1528,7 +1606,7 @@ public:
|
||||
|
||||
void SetCursor(const wxCursor& cursor) { m_cursor = cursor; }
|
||||
const wxCursor& GetCursor() const { return m_cursor; }
|
||||
bool HasCursor() const { return m_cursor.Ok(); }
|
||||
bool HasCursor() const { return m_cursor.IsOk(); }
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxSetCursorEvent(*this); }
|
||||
|
||||
@@ -2726,59 +2804,6 @@ private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxContextMenuEvent)
|
||||
};
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
// Idle event
|
||||
/*
|
||||
wxEVT_IDLE
|
||||
*/
|
||||
|
||||
// Whether to always send idle events to windows, or
|
||||
// to only send update events to those with the
|
||||
// wxWS_EX_PROCESS_IDLE style.
|
||||
|
||||
enum wxIdleMode
|
||||
{
|
||||
// Send idle events to all windows
|
||||
wxIDLE_PROCESS_ALL,
|
||||
|
||||
// Send idle events to windows that have
|
||||
// the wxWS_EX_PROCESS_IDLE flag specified
|
||||
wxIDLE_PROCESS_SPECIFIED
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxIdleEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
wxIdleEvent()
|
||||
: wxEvent(0, wxEVT_IDLE),
|
||||
m_requestMore(false)
|
||||
{ }
|
||||
wxIdleEvent(const wxIdleEvent& event)
|
||||
: wxEvent(event),
|
||||
m_requestMore(event.m_requestMore)
|
||||
{ }
|
||||
|
||||
void RequestMore(bool needMore = true) { m_requestMore = needMore; }
|
||||
bool MoreRequested() const { return m_requestMore; }
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxIdleEvent(*this); }
|
||||
|
||||
// Specify how wxWidgets will send idle events: to
|
||||
// all windows, or only to those which specify that they
|
||||
// will process the events.
|
||||
static void SetMode(wxIdleMode mode) { sm_idleMode = mode; }
|
||||
|
||||
// Returns the idle event mode
|
||||
static wxIdleMode GetMode() { return sm_idleMode; }
|
||||
|
||||
protected:
|
||||
bool m_requestMore;
|
||||
static wxIdleMode sm_idleMode;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent)
|
||||
};
|
||||
|
||||
/* TODO
|
||||
wxEVT_MOUSE_CAPTURE_CHANGED,
|
||||
@@ -2790,6 +2815,7 @@ private:
|
||||
wxEVT_COMPARE_ITEM
|
||||
*/
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
||||
|
||||
// ============================================================================
|
||||
@@ -3422,11 +3448,14 @@ inline void wxQueueEvent(wxEvtHandler *dest, wxEvent *event)
|
||||
|
||||
typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
|
||||
typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&);
|
||||
typedef void (wxEvtHandler::*wxThreadEventFunction)(wxThreadEvent&);
|
||||
|
||||
#define wxEventHandler(func) \
|
||||
wxEVENT_HANDLER_CAST(wxEventFunction, func)
|
||||
#define wxIdleEventHandler(func) \
|
||||
wxEVENT_HANDLER_CAST(wxIdleEventFunction, func)
|
||||
#define wxThreadEventHandler(func) \
|
||||
wxEVENT_HANDLER_CAST(wxThreadEventFunction, func)
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
@@ -3455,7 +3484,6 @@ protected:
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&);
|
||||
typedef void (wxEvtHandler::*wxThreadEventFunction)(wxThreadEvent&);
|
||||
typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&);
|
||||
typedef void (wxEvtHandler::*wxScrollWinEventFunction)(wxScrollWinEvent&);
|
||||
typedef void (wxEvtHandler::*wxSizeEventFunction)(wxSizeEvent&);
|
||||
@@ -3495,8 +3523,6 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
|
||||
#define wxCommandEventHandler(func) \
|
||||
wxEVENT_HANDLER_CAST(wxCommandEventFunction, func)
|
||||
#define wxThreadEventHandler(func) \
|
||||
wxEVENT_HANDLER_CAST(wxThreadEventFunction, func)
|
||||
#define wxScrollEventHandler(func) \
|
||||
wxEVENT_HANDLER_CAST(wxScrollEventFunction, func)
|
||||
#define wxScrollWinEventHandler(func) \
|
||||
@@ -3980,7 +4006,9 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
|
||||
#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_PASTE, winid, wxClipboardTextEventHandler(func))
|
||||
|
||||
// Thread events
|
||||
#define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_COMMAND_THREAD, id, wxThreadEventHandler(func))
|
||||
#define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_THREAD, id, wxThreadEventHandler(func))
|
||||
// alias for backward compatibility with 2.9.0:
|
||||
#define wxEVT_COMMAND_THREAD wxEVT_THREAD
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Helper functions
|
||||
|
@@ -55,6 +55,16 @@ enum
|
||||
wxFSW_EVENT_WARNING | wxFSW_EVENT_ERROR
|
||||
};
|
||||
|
||||
// Type of the path watched, used only internally for now.
|
||||
enum wxFSWPathType
|
||||
{
|
||||
wxFSWPath_None, // Invalid value for an initialized watch.
|
||||
wxFSWPath_File, // Plain file.
|
||||
wxFSWPath_Dir, // Watch a directory and the files in it.
|
||||
wxFSWPath_Tree // Watch a directory and all its children recursively.
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Event containing information about file system change.
|
||||
*/
|
||||
@@ -179,19 +189,17 @@ typedef void (wxEvtHandler::*wxFileSystemWatcherEventFunction)
|
||||
// wxFileSystemWatcherBase: interface for wxFileSystemWatcher
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Simple container to store information about one watched file
|
||||
*/
|
||||
// Simple container to store information about one watched path.
|
||||
class wxFSWatchInfo
|
||||
{
|
||||
public:
|
||||
wxFSWatchInfo() :
|
||||
m_path(wxEmptyString), m_events(-1)
|
||||
m_events(-1), m_type(wxFSWPath_None)
|
||||
{
|
||||
}
|
||||
|
||||
wxFSWatchInfo(const wxString& path, int events) :
|
||||
m_path(path), m_events(events)
|
||||
wxFSWatchInfo(const wxString& path, int events, wxFSWPathType type) :
|
||||
m_path(path), m_events(events), m_type(type)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -205,9 +213,15 @@ public:
|
||||
return m_events;
|
||||
}
|
||||
|
||||
wxFSWPathType GetType() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
|
||||
protected:
|
||||
wxString m_path;
|
||||
int m_events;
|
||||
wxFSWPathType m_type;
|
||||
};
|
||||
|
||||
WX_DECLARE_STRING_HASH_MAP(wxFSWatchInfo, wxFSWatchInfoMap);
|
||||
@@ -304,6 +318,11 @@ protected:
|
||||
return path_copy.GetFullPath();
|
||||
}
|
||||
|
||||
// Delegates the real work of adding the path to wxFSWatcherImpl::Add() and
|
||||
// updates m_watches if the new path was successfully added.
|
||||
bool DoAdd(const wxFileName& path, int events, wxFSWPathType type);
|
||||
|
||||
|
||||
wxFSWatchInfoMap m_watches; // path=>wxFSWatchInfo map
|
||||
wxFSWatcherImpl* m_service; // file system events service
|
||||
wxEvtHandler* m_owner; // handler for file system events
|
||||
|
@@ -25,7 +25,8 @@ class WXDLLIMPEXP_FWD_CORE wxDisclosureTriangle;
|
||||
// wxGenericCollapsiblePane
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGenericCollapsiblePane : public wxCollapsiblePaneBase
|
||||
class WXDLLIMPEXP_CORE wxGenericCollapsiblePane :
|
||||
public wxNavigationEnabled<wxCollapsiblePaneBase>
|
||||
{
|
||||
public:
|
||||
wxGenericCollapsiblePane() { Init(); }
|
||||
@@ -103,7 +104,6 @@ private:
|
||||
void OnButton(wxCommandEvent &ev);
|
||||
void OnSize(wxSizeEvent &ev);
|
||||
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericCollapsiblePane)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@@ -172,6 +172,8 @@ public:
|
||||
virtual wxRect GetItemRect( const wxDataViewItem & item,
|
||||
const wxDataViewColumn *column = NULL ) const;
|
||||
|
||||
virtual bool SetRowHeight( int rowHeight );
|
||||
|
||||
virtual void Expand( const wxDataViewItem & item );
|
||||
virtual void Collapse( const wxDataViewItem & item );
|
||||
virtual bool IsExpanded( const wxDataViewItem & item ) const;
|
||||
@@ -185,7 +187,7 @@ public:
|
||||
|
||||
virtual wxBorder GetDefaultBorder() const;
|
||||
|
||||
void StartEditor( const wxDataViewItem & item, unsigned int column );
|
||||
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
|
||||
|
||||
protected:
|
||||
virtual int GetSelections( wxArrayInt & sel ) const;
|
||||
|
@@ -432,9 +432,9 @@ public:
|
||||
void SetKind(wxAttrKind kind) { m_attrkind = kind; }
|
||||
|
||||
// accessors
|
||||
bool HasTextColour() const { return m_colText.Ok(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.Ok(); }
|
||||
bool HasFont() const { return m_font.Ok(); }
|
||||
bool HasTextColour() const { return m_colText.IsOk(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
|
||||
bool HasFont() const { return m_font.IsOk(); }
|
||||
bool HasAlignment() const
|
||||
{
|
||||
return m_hAlign != wxALIGN_INVALID || m_vAlign != wxALIGN_INVALID;
|
||||
|
@@ -75,6 +75,12 @@ protected:
|
||||
// Renders the hyperlink.
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
// Handle set/kill focus events (invalidate for painting focus rect)
|
||||
void OnFocus(wxFocusEvent& event);
|
||||
|
||||
// Fire a HyperlinkEvent on space
|
||||
void OnChar(wxKeyEvent& event);
|
||||
|
||||
// Returns the wxRect of the label of this hyperlink.
|
||||
// This is different from the clientsize's rectangle when
|
||||
// clientsize != bestsize and this rectangle is influenced
|
||||
|
@@ -546,6 +546,11 @@ public:
|
||||
// implemented for the lines
|
||||
virtual int GetLineAt(const wxGrid *grid, int pos) const = 0;
|
||||
|
||||
// Return the display position of the line with the given index.
|
||||
//
|
||||
// NB: As GetLineAt(), currently this is always identity for rows.
|
||||
virtual int GetLinePos(const wxGrid *grid, int line) const = 0;
|
||||
|
||||
// Return the index of the line just before the given one.
|
||||
virtual int GetLineBefore(const wxGrid* grid, int line) const = 0;
|
||||
|
||||
@@ -613,7 +618,9 @@ public:
|
||||
virtual void SetDefaultLineSize(wxGrid *grid, int size, bool resizeExisting) const
|
||||
{ grid->SetDefaultRowSize(size, resizeExisting); }
|
||||
|
||||
virtual int GetLineAt(const wxGrid * WXUNUSED(grid), int line) const
|
||||
virtual int GetLineAt(const wxGrid * WXUNUSED(grid), int pos) const
|
||||
{ return pos; } // TODO: implement row reordering
|
||||
virtual int GetLinePos(const wxGrid * WXUNUSED(grid), int line) const
|
||||
{ return line; } // TODO: implement row reordering
|
||||
|
||||
virtual int GetLineBefore(const wxGrid* WXUNUSED(grid), int line) const
|
||||
@@ -677,8 +684,10 @@ public:
|
||||
virtual void SetDefaultLineSize(wxGrid *grid, int size, bool resizeExisting) const
|
||||
{ grid->SetDefaultColSize(size, resizeExisting); }
|
||||
|
||||
virtual int GetLineAt(const wxGrid *grid, int line) const
|
||||
{ return grid->GetColAt(line); }
|
||||
virtual int GetLineAt(const wxGrid *grid, int pos) const
|
||||
{ return grid->GetColAt(pos); }
|
||||
virtual int GetLinePos(const wxGrid *grid, int line) const
|
||||
{ return grid->GetColPos(line); }
|
||||
|
||||
virtual int GetLineBefore(const wxGrid* grid, int line) const
|
||||
{ return grid->GetColAt(wxMax(0, grid->GetColPos(line) - 1)); }
|
||||
@@ -691,7 +700,10 @@ public:
|
||||
|
||||
// This class abstracts the difference between operations going forward
|
||||
// (down/right) and backward (up/left) and allows to use the same code for
|
||||
// functions which differ only in the direction of grid traversal
|
||||
// functions which differ only in the direction of grid traversal.
|
||||
//
|
||||
// Notice that all operations in this class work with display positions and not
|
||||
// internal indices which can be different if the columns were reordered.
|
||||
//
|
||||
// Like wxGridOperations it's an ABC with two concrete subclasses below. Unlike
|
||||
// it, this is a normal object and not just a function dispatch table and has a
|
||||
@@ -720,6 +732,12 @@ public:
|
||||
// Find the line at the given distance, in pixels, away from this one
|
||||
// (this uses clipping, i.e. anything after the last line is counted as the
|
||||
// last one and anything before the first one as 0)
|
||||
//
|
||||
// TODO: Implementation of this method currently doesn't support column
|
||||
// reordering as it mixes up indices and positions. But this doesn't
|
||||
// really matter as it's only called for rows (Page Up/Down only work
|
||||
// vertically) and row reordering is not currently supported. We'd
|
||||
// need to fix it if this ever changes however.
|
||||
virtual int MoveByPixelDistance(int line, int distance) const = 0;
|
||||
|
||||
// This class is never used polymorphically but give it a virtual dtor
|
||||
@@ -727,6 +745,28 @@ public:
|
||||
virtual ~wxGridDirectionOperations() { }
|
||||
|
||||
protected:
|
||||
// Get the position of the row or column from the given coordinates pair.
|
||||
//
|
||||
// This is just a shortcut to avoid repeating m_oper and m_grid multiple
|
||||
// times in the derived classes code.
|
||||
int GetLinePos(const wxGridCellCoords& coords) const
|
||||
{
|
||||
return m_oper.GetLinePos(m_grid, m_oper.Select(coords));
|
||||
}
|
||||
|
||||
// Get the index of the row or column from the position.
|
||||
int GetLineAt(int pos) const
|
||||
{
|
||||
return m_oper.GetLineAt(m_grid, pos);
|
||||
}
|
||||
|
||||
// Check if the given line is visible, i.e. has non 0 size.
|
||||
bool IsLineVisible(int line) const
|
||||
{
|
||||
return m_oper.GetLineSize(m_grid, line) != 0;
|
||||
}
|
||||
|
||||
|
||||
wxGrid * const m_grid;
|
||||
const wxGridOperations& m_oper;
|
||||
};
|
||||
@@ -743,14 +783,38 @@ public:
|
||||
{
|
||||
wxASSERT_MSG( m_oper.Select(coords) >= 0, "invalid row/column" );
|
||||
|
||||
return m_oper.Select(coords) == 0;
|
||||
int pos = GetLinePos(coords);
|
||||
while ( pos )
|
||||
{
|
||||
// Check the previous line.
|
||||
int line = GetLineAt(--pos);
|
||||
if ( IsLineVisible(line) )
|
||||
{
|
||||
// There is another visible line before this one, hence it's
|
||||
// not at boundary.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// We reached the boundary without finding any visible lines.
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void Advance(wxGridCellCoords& coords) const
|
||||
{
|
||||
wxASSERT( !IsAtBoundary(coords) );
|
||||
int pos = GetLinePos(coords);
|
||||
for ( ;; )
|
||||
{
|
||||
// This is not supposed to happen if IsAtBoundary() returned false.
|
||||
wxCHECK_RET( pos, "can't advance when already at boundary" );
|
||||
|
||||
m_oper.Set(coords, m_oper.Select(coords) - 1);
|
||||
int line = GetLineAt(--pos);
|
||||
if ( IsLineVisible(line) )
|
||||
{
|
||||
m_oper.Set(coords, line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual int MoveByPixelDistance(int line, int distance) const
|
||||
@@ -760,6 +824,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// Please refer to the comments above when reading this class code, it's
|
||||
// absolutely symmetrical to wxGridBackwardOperations.
|
||||
class wxGridForwardOperations : public wxGridDirectionOperations
|
||||
{
|
||||
public:
|
||||
@@ -773,14 +839,32 @@ public:
|
||||
{
|
||||
wxASSERT_MSG( m_oper.Select(coords) < m_numLines, "invalid row/column" );
|
||||
|
||||
return m_oper.Select(coords) == m_numLines - 1;
|
||||
int pos = GetLinePos(coords);
|
||||
while ( pos < m_numLines - 1 )
|
||||
{
|
||||
int line = GetLineAt(++pos);
|
||||
if ( IsLineVisible(line) )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual void Advance(wxGridCellCoords& coords) const
|
||||
{
|
||||
wxASSERT( !IsAtBoundary(coords) );
|
||||
int pos = GetLinePos(coords);
|
||||
for ( ;; )
|
||||
{
|
||||
wxCHECK_RET( pos < m_numLines - 1,
|
||||
"can't advance when already at boundary" );
|
||||
|
||||
m_oper.Set(coords, m_oper.Select(coords) + 1);
|
||||
int line = GetLineAt(++pos);
|
||||
if ( IsLineVisible(line) )
|
||||
{
|
||||
m_oper.Set(coords, line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual int MoveByPixelDistance(int line, int distance) const
|
||||
|
@@ -92,7 +92,7 @@ public:
|
||||
|
||||
// forwarded events from children windows
|
||||
void OnSpinButton(wxSpinEvent& event);
|
||||
void OnTextLostFocus();
|
||||
void OnTextLostFocus(wxFocusEvent& event);
|
||||
void OnTextChar(wxKeyEvent& event);
|
||||
|
||||
// this window itself is used only as a container for its sub windows so it
|
||||
@@ -148,6 +148,8 @@ protected:
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#else // !wxUSE_SPINBTN
|
||||
|
@@ -49,7 +49,7 @@ enum
|
||||
// to prevent flickering. (WS_CLIPCHILDREN doesn't work in all cases so can't be
|
||||
// standard).
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSplitterWindow: public wxWindow
|
||||
class WXDLLIMPEXP_CORE wxSplitterWindow: public wxNavigationEnabled<wxWindow>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -300,8 +300,6 @@ protected:
|
||||
bool m_checkRequestedSashPosition:1;
|
||||
|
||||
private:
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxSplitterWindow)
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxDECLARE_NO_COPY_CLASS(wxSplitterWindow);
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
private:
|
||||
wxSize GetBitmapSize()
|
||||
{
|
||||
return m_bitmap.Ok() ? wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight())
|
||||
return m_bitmap.IsOk() ? wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight())
|
||||
: wxSize(16, 16); // this is completely arbitrary
|
||||
}
|
||||
|
||||
|
@@ -27,6 +27,20 @@ enum wxAntialiasMode
|
||||
wxANTIALIAS_DEFAULT,
|
||||
};
|
||||
|
||||
enum wxInterpolationQuality
|
||||
{
|
||||
// default interpolation
|
||||
wxINTERPOLATION_DEFAULT,
|
||||
// no interpolation
|
||||
wxINTERPOLATION_NONE,
|
||||
// fast interpolation, suited for interactivity
|
||||
wxINTERPOLATION_FAST,
|
||||
// better quality
|
||||
wxINTERPOLATION_GOOD,
|
||||
// best quality, not suited for interactivity
|
||||
wxINTERPOLATION_BEST
|
||||
};
|
||||
|
||||
enum wxCompositionMode
|
||||
{
|
||||
// R = Result, S = Source, D = Destination, premultiplied with alpha
|
||||
@@ -35,6 +49,7 @@ enum wxCompositionMode
|
||||
// classic Porter-Duff compositions
|
||||
// http://keithp.com/~keithp/porterduff/p253-porter.pdf
|
||||
|
||||
wxCOMPOSITION_INVALID = -1, /* indicates invalid/unsupported mode */
|
||||
wxCOMPOSITION_CLEAR, /* R = 0 */
|
||||
wxCOMPOSITION_SOURCE, /* R = S */
|
||||
wxCOMPOSITION_OVER, /* R = S + D*(1 - Sa) */
|
||||
@@ -50,7 +65,7 @@ enum wxCompositionMode
|
||||
wxCOMPOSITION_XOR, /* R = S*(1 - Da) + D*(1 - Sa) */
|
||||
|
||||
// mathematical compositions
|
||||
wxCOMPOSITION_ADD, /* R = S + D */
|
||||
wxCOMPOSITION_ADD /* R = S + D */
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindowDC;
|
||||
@@ -496,6 +511,12 @@ public:
|
||||
// sets the antialiasing mode, returns true if it supported
|
||||
virtual bool SetAntialiasMode(wxAntialiasMode antialias) = 0;
|
||||
|
||||
// returns the current interpolation quality
|
||||
virtual wxInterpolationQuality GetInterpolationQuality() const { return m_interpolation; }
|
||||
|
||||
// sets the interpolation quality, returns true if it supported
|
||||
virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation) = 0;
|
||||
|
||||
// returns the current compositing operator
|
||||
virtual wxCompositionMode GetCompositionMode() const { return m_composition; }
|
||||
|
||||
@@ -660,6 +681,7 @@ protected:
|
||||
wxGraphicsFont m_font;
|
||||
wxAntialiasMode m_antialias;
|
||||
wxCompositionMode m_composition;
|
||||
wxInterpolationQuality m_interpolation;
|
||||
bool m_enableOffset;
|
||||
|
||||
protected:
|
||||
|
81
include/wx/gtk/anybutton.h
Normal file
81
include/wx/gtk/anybutton.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/gtk/anybutton.h
|
||||
// Purpose: wxGTK wxAnyButton class declaration
|
||||
// Author: Robert Roebling
|
||||
// Created: 1998-05-20 (extracted from button.h)
|
||||
// Id: $Id: anybutton.h 67066 2011-02-27 12:48:30Z VZ $
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GTK_ANYBUTTON_H_
|
||||
#define _WX_GTK_ANYBUTTON_H_
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxAnyButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
|
||||
{
|
||||
public:
|
||||
wxAnyButton()
|
||||
{
|
||||
m_isCurrent =
|
||||
m_isPressed = false;
|
||||
}
|
||||
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// called from GTK callbacks: they update the button state and call
|
||||
// GTKUpdateBitmap()
|
||||
void GTKMouseEnters();
|
||||
void GTKMouseLeaves();
|
||||
void GTKPressed();
|
||||
void GTKReleased();
|
||||
|
||||
protected:
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State which) const;
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
virtual void DoSetBitmapPosition(wxDirection dir);
|
||||
|
||||
private:
|
||||
typedef wxAnyButtonBase base_type;
|
||||
|
||||
// focus event handler: calls GTKUpdateBitmap()
|
||||
void GTKOnFocus(wxFocusEvent& event);
|
||||
|
||||
// update the bitmap to correspond to the current button state
|
||||
void GTKUpdateBitmap();
|
||||
|
||||
// return the current button state from m_isXXX flags (which means that it
|
||||
// might not correspond to the real current state as e.g. m_isCurrent will
|
||||
// never be true if we don't have a valid current bitmap)
|
||||
State GTKGetCurrentState() const;
|
||||
|
||||
// show the given bitmap (must be valid)
|
||||
void GTKDoShowBitmap(const wxBitmap& bitmap);
|
||||
|
||||
|
||||
// the bitmaps for the different state of the buttons, all of them may be
|
||||
// invalid and the button only shows a bitmap at all if State_Normal bitmap
|
||||
// is valid
|
||||
wxBitmap m_bitmaps[State_Max];
|
||||
|
||||
// true iff mouse is currently over the button
|
||||
bool m_isCurrent;
|
||||
|
||||
// true iff the button is in pressed state
|
||||
bool m_isPressed;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_ANYBUTTON_H_
|
@@ -17,7 +17,7 @@
|
||||
class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
|
||||
{
|
||||
public:
|
||||
wxButton() { Init(); }
|
||||
wxButton() {}
|
||||
wxButton(wxWindow *parent, wxWindowID id,
|
||||
const wxString& label = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@@ -25,8 +25,6 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
@@ -39,7 +37,6 @@ public:
|
||||
|
||||
virtual wxWindow *SetDefault();
|
||||
virtual void SetLabel( const wxString &label );
|
||||
virtual bool Enable( bool enable = true );
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
@@ -61,12 +58,6 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State which) const;
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
virtual void DoSetBitmapPosition(wxDirection dir);
|
||||
|
||||
#if wxUSE_MARKUP
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP
|
||||
@@ -74,42 +65,9 @@ protected:
|
||||
private:
|
||||
typedef wxButtonBase base_type;
|
||||
|
||||
// common part of all ctors
|
||||
void Init()
|
||||
{
|
||||
m_isCurrent =
|
||||
m_isPressed = false;
|
||||
}
|
||||
|
||||
// focus event handler: calls GTKUpdateBitmap()
|
||||
void GTKOnFocus(wxFocusEvent& event);
|
||||
|
||||
// update the bitmap to correspond to the current button state
|
||||
void GTKUpdateBitmap();
|
||||
|
||||
// return the current button state from m_isXXX flags (which means that it
|
||||
// might not correspond to the real current state as e.g. m_isCurrent will
|
||||
// never be true if we don't have a valid current bitmap)
|
||||
State GTKGetCurrentState() const;
|
||||
|
||||
// show the given bitmap (must be valid)
|
||||
void GTKDoShowBitmap(const wxBitmap& bitmap);
|
||||
|
||||
// Return the GtkLabel used by this button.
|
||||
GtkLabel *GTKGetLabel() const;
|
||||
|
||||
|
||||
// the bitmaps for the different state of the buttons, all of them may be
|
||||
// invalid and the button only shows a bitmap at all if State_Normal bitmap
|
||||
// is valid
|
||||
wxBitmap m_bitmaps[State_Max];
|
||||
|
||||
// true iff mouse is currently over the button
|
||||
bool m_isCurrent;
|
||||
|
||||
// true iff the button is in pressed state
|
||||
bool m_isPressed;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxButton)
|
||||
};
|
||||
|
||||
|
@@ -38,15 +38,31 @@ public:
|
||||
virtual bool SetDate(const wxDateTime& date);
|
||||
virtual wxDateTime GetDate() const;
|
||||
|
||||
virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime,
|
||||
const wxDateTime& upperdate = wxDefaultDateTime);
|
||||
virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const;
|
||||
|
||||
virtual bool EnableMonthChange(bool enable = true);
|
||||
|
||||
virtual void Mark(size_t day, bool mark);
|
||||
|
||||
// implementation
|
||||
// --------------
|
||||
wxDateTime m_selectedDate;
|
||||
|
||||
void GTKGenerateEvent(wxEventType type);
|
||||
|
||||
private:
|
||||
bool IsInValidRange(const wxDateTime& dt) const;
|
||||
|
||||
// Range of the dates that can be selected by user, either or both may be
|
||||
// invalid to indicate that no corresponding restriction is set.
|
||||
wxDateTime m_validStart,
|
||||
m_validEnd;
|
||||
|
||||
// Last known selected date, may be different from the real selection in
|
||||
// the control while a handler for day-selected is running.
|
||||
wxDateTime m_selectedDate;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkCalendarCtrl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxGtkCalendarCtrl);
|
||||
};
|
||||
|
@@ -159,6 +159,10 @@ public:
|
||||
virtual wxRect GetItemRect( const wxDataViewItem &item,
|
||||
const wxDataViewColumn *column = NULL ) const;
|
||||
|
||||
virtual bool SetRowHeight( int rowHeight );
|
||||
|
||||
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
|
||||
|
||||
virtual void Expand( const wxDataViewItem & item );
|
||||
virtual void Collapse( const wxDataViewItem & item );
|
||||
virtual bool IsExpanded( const wxDataViewItem & item ) const;
|
||||
@@ -180,6 +184,8 @@ public:
|
||||
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
int GTKGetUniformRowHeight() const { return m_uniformRowHeight; }
|
||||
|
||||
protected:
|
||||
virtual void DoSetExpanderColumn();
|
||||
virtual void DoSetIndent();
|
||||
@@ -207,6 +213,11 @@ private:
|
||||
wxDataViewColumnList m_cols;
|
||||
wxDataViewItem m_ensureVisibleDefered;
|
||||
|
||||
// By default this is set to -1 and the height of the rows is determined by
|
||||
// GetRect() methods of the renderers but this can be set to a positive
|
||||
// value to force the height of all rows to the given value.
|
||||
int m_uniformRowHeight;
|
||||
|
||||
virtual void AddChildGTK(wxWindowGTK* child);
|
||||
void GtkEnableSelectionEvents();
|
||||
void GtkDisableSelectionEvents();
|
||||
|
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
GtkCellRenderer* GetGtkHandle() { return m_renderer; }
|
||||
void GtkInitHandlers();
|
||||
void GtkUpdateAlignment();
|
||||
void GtkUpdateAlignment() { GtkApplyAlignment(m_renderer); }
|
||||
|
||||
// should be overridden to return true if the renderer supports properties
|
||||
// corresponding to wxDataViewItemAttr field, see wxGtkTreeCellDataFunc()
|
||||
@@ -85,6 +85,9 @@ protected:
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
|
||||
// Apply our effective alignment (i.e. m_alignment if specified or the
|
||||
// associated column alignment by default) to the given renderer.
|
||||
void GtkApplyAlignment(GtkCellRenderer *renderer);
|
||||
|
||||
GtkCellRenderer *m_renderer;
|
||||
int m_alignment;
|
||||
|
@@ -147,6 +147,10 @@ protected:
|
||||
bool Init(wxDataViewCellMode mode, int align);
|
||||
|
||||
private:
|
||||
// Called from GtkGetTextRenderer() to really create the renderer if
|
||||
// necessary.
|
||||
void GtkInitTextRenderer();
|
||||
|
||||
wxDC *m_dc;
|
||||
|
||||
GtkCellRendererText *m_text_renderer;
|
||||
@@ -185,9 +189,17 @@ public:
|
||||
virtual wxSize GetSize() const;
|
||||
|
||||
private:
|
||||
void GTKSetLabel();
|
||||
|
||||
wxString m_label;
|
||||
int m_value;
|
||||
|
||||
#if !wxUSE_UNICODE
|
||||
// Flag used to indicate that we need to set the label because we were
|
||||
// unable to do it in the ctor (see comments there).
|
||||
bool m_needsToSetLabel;
|
||||
#endif // !wxUSE_UNICODE
|
||||
|
||||
protected:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
|
||||
};
|
||||
|
@@ -101,7 +101,6 @@ private:
|
||||
// common part of Append (if pos == -1) and Insert
|
||||
bool GtkAppend(wxMenuItem *item, int pos=-1);
|
||||
|
||||
GtkWidget *m_prevRadio;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMenu)
|
||||
};
|
||||
|
@@ -52,13 +52,13 @@ extern const gchar *wx_pango_version_check(int major, int minor, int micro);
|
||||
// helper: use the encoding of the given font if it's valid
|
||||
inline wxCharBuffer wxConvertToGTK(const wxString& s, const wxFont& font)
|
||||
{
|
||||
return wxConvertToGTK(s, font.Ok() ? font.GetEncoding()
|
||||
return wxConvertToGTK(s, font.IsOk() ? font.GetEncoding()
|
||||
: wxFONTENCODING_SYSTEM);
|
||||
}
|
||||
|
||||
inline wxCharBuffer wxConvertFromGTK(const wxString& s, const wxFont& font)
|
||||
{
|
||||
return wxConvertFromGTK(s, font.Ok() ? font.GetEncoding()
|
||||
return wxConvertFromGTK(s, font.IsOk() ? font.GetEncoding()
|
||||
: wxFONTENCODING_SYSTEM);
|
||||
}
|
||||
|
||||
|
@@ -22,67 +22,6 @@
|
||||
class WXDLLIMPEXP_FWD_CORE wxToggleButton;
|
||||
class WXDLLIMPEXP_FWD_CORE wxToggleBitmapButton;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmapToggleButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButtonBase
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wxBitmapToggleButton() {}
|
||||
wxBitmapToggleButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
// Create the control
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
// Get/set the value
|
||||
void SetValue(bool state);
|
||||
bool GetValue() const;
|
||||
|
||||
// Set the label
|
||||
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); }
|
||||
virtual void SetLabel(const wxBitmap& label);
|
||||
bool Enable(bool enable = true);
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
// implementation
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
void OnSetBitmap();
|
||||
|
||||
protected:
|
||||
void GTKDisableEvents();
|
||||
void GTKEnableEvents();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
private:
|
||||
typedef wxToggleButtonBase base_type;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxToggleButton
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -119,7 +58,6 @@ public:
|
||||
|
||||
// Set the label
|
||||
void SetLabel(const wxString& label);
|
||||
bool Enable(bool enable = true);
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
@@ -130,13 +68,61 @@ protected:
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
#if wxUSE_MARKUP
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
private:
|
||||
typedef wxToggleButtonBase base_type;
|
||||
|
||||
// Return the GtkLabel used by this toggle button.
|
||||
GtkLabel *GTKGetLabel() const;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxToggleButton)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmapToggleButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButton
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wxBitmapToggleButton() {}
|
||||
wxBitmapToggleButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
// Create the control
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
// deprecated synonym for SetBitmapLabel()
|
||||
wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap),
|
||||
SetBitmapLabel(bitmap); )
|
||||
// prevent virtual function hiding
|
||||
virtual void SetLabel(const wxString& label) { wxToggleButton::SetLabel(label); }
|
||||
|
||||
private:
|
||||
typedef wxToggleButtonBase base_type;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_TOGGLEBUTTON_H_
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
// type of compare function for wxListCtrl sort operation
|
||||
typedef
|
||||
int (wxCALLBACK *wxListCtrlCompare)(long item1, long item2, wxIntPtr sortData);
|
||||
int (wxCALLBACK *wxListCtrlCompare)(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxListCtrl constants
|
||||
@@ -183,9 +183,9 @@ public:
|
||||
void SetFont(const wxFont& font) { m_font = font; }
|
||||
|
||||
// accessors
|
||||
bool HasTextColour() const { return m_colText.Ok(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.Ok(); }
|
||||
bool HasFont() const { return m_font.Ok(); }
|
||||
bool HasTextColour() const { return m_colText.IsOk(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
|
||||
bool HasFont() const { return m_font.IsOk(); }
|
||||
|
||||
const wxColour& GetTextColour() const { return m_colText; }
|
||||
const wxColour& GetBackgroundColour() const { return m_colBack; }
|
||||
|
@@ -1113,6 +1113,33 @@ template<> class numeric_limits<wxULongLong>
|
||||
|
||||
#endif // wxUSE_LONGLONG_NATIVE
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Specialize wxArgNormalizer to allow using wxLongLong directly with wx pseudo
|
||||
// vararg functions.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Notice that this must be done here and not in wx/strvararg.h itself because
|
||||
// we can't include wx/longlong.h from there as this header itself includes
|
||||
// wx/string.h which includes wx/strvararg.h too, so to avoid the circular
|
||||
// dependencies we can only do it here (or add another header just for this but
|
||||
// it doesn't seem necessary).
|
||||
#include "wx/strvararg.h"
|
||||
|
||||
template<>
|
||||
struct WXDLLIMPEXP_BASE wxArgNormalizer<wxLongLong>
|
||||
{
|
||||
wxArgNormalizer(wxLongLong value,
|
||||
const wxFormatString *fmt, unsigned index)
|
||||
: m_value(value)
|
||||
{
|
||||
wxASSERT_ARG_TYPE( fmt, index, wxFormatString::Arg_LongLongInt );
|
||||
}
|
||||
|
||||
wxLongLong_t get() const { return m_value.GetValue(); }
|
||||
|
||||
wxLongLong m_value;
|
||||
};
|
||||
|
||||
#endif // wxUSE_LONGLONG
|
||||
|
||||
#endif // _WX_LONGLONG_H
|
||||
|
@@ -303,20 +303,18 @@
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Default is 1 if compiler supports it. Currently this means not one of the
|
||||
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
|
||||
// needs non-default options for such build to avoid getting "fatal error
|
||||
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
|
||||
// higher limit" in its own standard headers, so you need to ensure you do
|
||||
// increase the heap size before enabling this option for this compiler.
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers and that VC6 needs non-default options for
|
||||
// such build to avoid getting "fatal error C1076: compiler limit : internal
|
||||
// heap limit reached; use /Zm to specify a higher limit" in its own standard
|
||||
// headers, so you need to ensure you do increase the heap size before enabling
|
||||
// this option for this compiler.
|
||||
//
|
||||
// Recommended setting: 1 unless you use a system without good implementation
|
||||
// of STL.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
#else
|
||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
||||
#endif
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
// build and/or the existing code is a concern.
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
|
||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
||||
|
81
include/wx/msw/anybutton.h
Normal file
81
include/wx/msw/anybutton.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/anybutton.h
|
||||
// Purpose: wxAnyButton class
|
||||
// Author: Julian Smart
|
||||
// Created: 1997-02-01 (extracted from button.h)
|
||||
// RCS-ID: $Id: anybutton.h 67065 2011-02-27 12:48:26Z VZ $
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_MSW_ANYBUTTON_H_
|
||||
#define _WX_MSW_ANYBUTTON_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Common button functionality
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
|
||||
{
|
||||
public:
|
||||
wxAnyButton()
|
||||
{
|
||||
m_imageData = NULL;
|
||||
#if wxUSE_MARKUP
|
||||
m_markupText = NULL;
|
||||
#endif // wxUSE_MARKUP
|
||||
}
|
||||
|
||||
virtual ~wxAnyButton();
|
||||
|
||||
// overridden base class methods
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual bool SetBackgroundColour(const wxColour &colour);
|
||||
virtual bool SetForegroundColour(const wxColour &colour);
|
||||
|
||||
// implementation from now on
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
virtual State GetNormalState() const { return State_Normal; }
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
// usually overridden base class virtuals
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State which) const;
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
virtual wxSize DoGetBitmapMargins() const;
|
||||
virtual void DoSetBitmapMargins(wxCoord x, wxCoord y);
|
||||
virtual void DoSetBitmapPosition(wxDirection dir);
|
||||
|
||||
#if wxUSE_MARKUP
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
// Increases the passed in size to account for the button image.
|
||||
//
|
||||
// Should only be called if we do have a button, i.e. if m_imageData is
|
||||
// non-NULL.
|
||||
void AdjustForBitmapSize(wxSize& size) const;
|
||||
|
||||
class wxButtonImageData *m_imageData;
|
||||
|
||||
#if wxUSE_MARKUP
|
||||
class wxMarkupText *m_markupText;
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
// Switches button into owner-drawn mode: this is used if we need to draw
|
||||
// something not supported by the native control, such as using non default
|
||||
// colours or a bitmap on pre-XP systems.
|
||||
void MakeOwnerDrawn();
|
||||
bool IsOwnerDrawn() const;
|
||||
|
||||
private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
|
||||
};
|
||||
|
||||
#endif // _WX_MSW_ANYBUTTON_H_
|
@@ -19,7 +19,7 @@
|
||||
class WXDLLIMPEXP_CORE wxBitmapButton : public wxBitmapButtonBase
|
||||
{
|
||||
public:
|
||||
wxBitmapButton() { Init(); }
|
||||
wxBitmapButton() {}
|
||||
|
||||
wxBitmapButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
@@ -30,8 +30,6 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr)
|
||||
{
|
||||
Init();
|
||||
|
||||
Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
@@ -45,25 +43,6 @@ public:
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init()
|
||||
{
|
||||
m_disabledSetByUser =
|
||||
m_hoverSetByUser = false;
|
||||
}
|
||||
|
||||
// reimplement some base class virtuals
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
|
||||
// true if disabled bitmap was set by user, false if we created it
|
||||
// ourselves from the normal one
|
||||
bool m_disabledSetByUser;
|
||||
|
||||
// true if hover bitmap was set by user, false if it was set from focused
|
||||
// one
|
||||
bool m_hoverSetByUser;
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton)
|
||||
};
|
||||
|
@@ -9,8 +9,8 @@
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_BUTTON_H_
|
||||
#define _WX_BUTTON_H_
|
||||
#ifndef _WX_MSW_BUTTON_H_
|
||||
#define _WX_MSW_BUTTON_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Pushbutton
|
||||
@@ -47,22 +47,13 @@ public:
|
||||
|
||||
virtual wxWindow *SetDefault();
|
||||
|
||||
// overridden base class methods
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual bool SetBackgroundColour(const wxColour &colour);
|
||||
virtual bool SetForegroundColour(const wxColour &colour);
|
||||
|
||||
// implementation from now on
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
|
||||
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
// send a notification event, return true if processed
|
||||
bool SendClickEvent();
|
||||
@@ -74,32 +65,8 @@ protected:
|
||||
// set or unset BS_DEFPUSHBUTTON style
|
||||
static void SetDefaultStyle(wxButton *btn, bool on);
|
||||
|
||||
// usually overridden base class virtuals
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual bool DoGetAuthNeeded() const;
|
||||
virtual void DoSetAuthNeeded(bool show);
|
||||
virtual wxBitmap DoGetBitmap(State which) const;
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
virtual wxSize DoGetBitmapMargins() const;
|
||||
virtual void DoSetBitmapMargins(wxCoord x, wxCoord y);
|
||||
virtual void DoSetBitmapPosition(wxDirection dir);
|
||||
|
||||
#if wxUSE_MARKUP
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
// Increases the passed in size to account for the button image.
|
||||
//
|
||||
// Should only be called if we do have a button, i.e. if m_imageData is
|
||||
// non-NULL.
|
||||
void AdjustForBitmapSize(wxSize& size) const;
|
||||
|
||||
class wxButtonImageData *m_imageData;
|
||||
|
||||
#if wxUSE_MARKUP
|
||||
class wxMarkupText *m_markupText;
|
||||
#endif // wxUSE_MARKUP
|
||||
|
||||
// true if the UAC symbol is shown
|
||||
bool m_authNeeded;
|
||||
@@ -107,19 +74,10 @@ protected:
|
||||
private:
|
||||
void Init()
|
||||
{
|
||||
m_imageData = NULL;
|
||||
#if wxUSE_MARKUP
|
||||
m_markupText = NULL;
|
||||
#endif // wxUSE_MARKUP
|
||||
m_authNeeded = false;
|
||||
}
|
||||
|
||||
// Switches button into owner-drawn mode: this is used if we need to draw
|
||||
// something not supported by the native control, such as using non default
|
||||
// colours or a bitmap on pre-XP systems.
|
||||
void MakeOwnerDrawn();
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxButton);
|
||||
};
|
||||
|
||||
#endif // _WX_BUTTON_H_
|
||||
#endif // _WX_MSW_BUTTON_H_
|
||||
|
@@ -89,6 +89,7 @@ public:
|
||||
|
||||
// as above, but takes reference DC as first argument to take resolution,
|
||||
// size, font metrics etc. from
|
||||
wxEXPLICIT
|
||||
wxEnhMetaFileDC(const wxDC& referenceDC,
|
||||
const wxString& filename = wxEmptyString,
|
||||
int width = 0, int height = 0,
|
||||
|
@@ -23,6 +23,12 @@ public:
|
||||
wxMSWFileSystemWatcher(const wxFileName& path,
|
||||
int events = wxFSW_EVENT_ALL);
|
||||
|
||||
// Override the base class function to provide a much more efficient
|
||||
// implementation for it using the platform native support for watching the
|
||||
// entire directory trees.
|
||||
virtual bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL,
|
||||
const wxString& filter = wxEmptyString);
|
||||
|
||||
protected:
|
||||
bool Init();
|
||||
};
|
||||
|
@@ -82,7 +82,7 @@ protected:
|
||||
|
||||
wxString m_helpFile;
|
||||
|
||||
DECLARE_CLASS(wxCHMHelpController)
|
||||
DECLARE_DYNAMIC_CLASS(wxCHMHelpController)
|
||||
};
|
||||
|
||||
#endif // wxUSE_MS_HTML_HELP
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWinHelpController: public wxHelpControllerBase
|
||||
{
|
||||
DECLARE_CLASS(wxWinHelpController)
|
||||
DECLARE_DYNAMIC_CLASS(wxWinHelpController)
|
||||
|
||||
public:
|
||||
wxWinHelpController(wxWindow* parentWindow = NULL): wxHelpControllerBase(parentWindow) {}
|
||||
|
@@ -25,6 +25,7 @@ class WXDLLIMPEXP_FWD_CORE wxFrame;
|
||||
class WXDLLIMPEXP_FWD_CORE wxToolBar;
|
||||
#endif
|
||||
|
||||
class wxMenuRadioItemsData;
|
||||
|
||||
// Not using a combined wxToolBar/wxMenuBar? then use
|
||||
// a commandbar in WinCE .NET to implement the
|
||||
@@ -63,13 +64,16 @@ public:
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
||||
virtual void Attach(wxMenuBarBase *menubar);
|
||||
|
||||
bool MSWCommand(WXUINT param, WXWORD id);
|
||||
|
||||
// get the native menu handle
|
||||
WXHMENU GetHMenu() const { return m_hMenu; }
|
||||
|
||||
// Return the start and end position of the radio group to which the item
|
||||
// at the given position belongs. Returns false if there is no radio group
|
||||
// containing this position.
|
||||
bool MSWGetRadioGroupRange(int pos, int *start, int *end) const;
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
// called by wxMenuBar to build its accel table from the accels of all menus
|
||||
bool HasAccels() const { return !m_accels.empty(); }
|
||||
@@ -122,15 +126,17 @@ private:
|
||||
// common part of Append/Insert (behaves as Append is pos == (size_t)-1)
|
||||
bool DoInsertOrAppend(wxMenuItem *item, size_t pos = (size_t)-1);
|
||||
|
||||
// terminate the current radio group, if any
|
||||
void EndRadioGroup();
|
||||
|
||||
// This variable contains the description of the radio item groups and
|
||||
// allows to find whether an item at the given position is part of the
|
||||
// group and also where its group starts and ends.
|
||||
//
|
||||
// It is initially NULL and only allocated if we have any radio items.
|
||||
wxMenuRadioItemsData *m_radioData;
|
||||
|
||||
// if true, insert a breal before appending the next item
|
||||
bool m_doBreak;
|
||||
|
||||
// the position of the first item in the current radio group or -1
|
||||
int m_startRadioGroup;
|
||||
|
||||
// the menu handle of this menu
|
||||
WXHMENU m_hMenu;
|
||||
|
||||
|
@@ -61,11 +61,6 @@ public:
|
||||
// Win32 API
|
||||
WXWPARAM GetMSWId() const;
|
||||
|
||||
// mark item as belonging to the given radio group
|
||||
void SetAsRadioGroupStart();
|
||||
void SetRadioGroupStart(int start);
|
||||
void SetRadioGroupEnd(int end);
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
// compatibility only, don't use in new code
|
||||
wxDEPRECATED(
|
||||
@@ -130,18 +125,6 @@ private:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// the positions of the first and last items of the radio group this item
|
||||
// belongs to or -1: start is the radio group start and is valid for all
|
||||
// but first radio group items (m_isRadioGroupStart == false), end is valid
|
||||
// only for the first one
|
||||
union
|
||||
{
|
||||
int start;
|
||||
int end;
|
||||
} m_radioGroup;
|
||||
|
||||
// does this item start a radio group?
|
||||
bool m_isRadioGroupStart;
|
||||
|
||||
#if wxUSE_OWNER_DRAWN
|
||||
// item bitmaps
|
||||
|
@@ -3,7 +3,7 @@
|
||||
// Purpose: wxMSW-specific wxPanel class.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-03-18
|
||||
// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -34,6 +34,8 @@ public:
|
||||
Create(parent, winid, pos, size, style, name);
|
||||
}
|
||||
|
||||
virtual ~wxPanel();
|
||||
|
||||
// This is overridden for MSW to return true for all panels that are child
|
||||
// of a window with themed background (such as wxNotebook) which should
|
||||
// show through the child panels.
|
||||
|
@@ -454,7 +454,7 @@ private:
|
||||
void DoInit(HGDIOBJ hgdiobj) { m_hgdiobj = ::SelectObject(m_hdc, hgdiobj); }
|
||||
|
||||
public:
|
||||
SelectInHDC() : m_hdc(NULL) { }
|
||||
SelectInHDC() : m_hdc(NULL), m_hgdiobj(NULL) { }
|
||||
SelectInHDC(HDC hdc, HGDIOBJ hgdiobj) : m_hdc(hdc) { DoInit(hgdiobj); }
|
||||
|
||||
void Init(HDC hdc, HGDIOBJ hgdiobj)
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
m_path);
|
||||
}
|
||||
}
|
||||
delete m_overlapped;
|
||||
free(m_overlapped);
|
||||
}
|
||||
|
||||
bool IsOk() const
|
||||
@@ -104,7 +104,6 @@ private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxFSWatchEntryMSW);
|
||||
};
|
||||
|
||||
|
||||
// ============================================================================
|
||||
// wxFSWatcherImplMSW helper classes implementations
|
||||
// ============================================================================
|
||||
@@ -156,6 +155,48 @@ public:
|
||||
return m_watches.insert(val).second;
|
||||
}
|
||||
|
||||
// Removes a watch we're currently using. Notice that this doesn't happen
|
||||
// immediately, CompleteRemoval() must be called later when it's really
|
||||
// safe to delete the watch, i.e. after completion of the IO operation
|
||||
// using it.
|
||||
bool ScheduleForRemoval(const wxSharedPtr<wxFSWatchEntryMSW>& watch)
|
||||
{
|
||||
wxCHECK_MSG( m_iocp != INVALID_HANDLE_VALUE, false, "IOCP not init" );
|
||||
wxCHECK_MSG( watch->IsOk(), false, "Invalid watch" );
|
||||
|
||||
const wxString path = watch->GetPath();
|
||||
wxFSWatchEntries::iterator it = m_watches.find(path);
|
||||
wxCHECK_MSG( it != m_watches.end(), false,
|
||||
"Can't remove a watch we don't use" );
|
||||
|
||||
// We can't just delete the watch here as we can have pending events
|
||||
// for it and if we destroyed it now, we could get a dangling (or,
|
||||
// worse, reused to point to another object) pointer in ReadEvents() so
|
||||
// just remember that this one should be removed when CompleteRemoval()
|
||||
// is called later.
|
||||
m_removedWatches.insert(wxFSWatchEntries::value_type(path, watch));
|
||||
m_watches.erase(it);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Really remove the watch previously passed to ScheduleForRemoval().
|
||||
//
|
||||
// It's ok to call this for a watch that hadn't been removed before, in
|
||||
// this case we'll just return false and do nothing.
|
||||
bool CompleteRemoval(wxFSWatchEntryMSW* watch)
|
||||
{
|
||||
wxFSWatchEntries::iterator it = m_removedWatches.find(watch->GetPath());
|
||||
if ( it == m_removedWatches.end() )
|
||||
return false;
|
||||
|
||||
// Removing the object from the map will result in deleting the watch
|
||||
// itself as it's not referenced from anywhere else now.
|
||||
m_removedWatches.erase(it);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// post completion packet
|
||||
bool PostEmptyStatus()
|
||||
{
|
||||
@@ -203,7 +244,13 @@ protected:
|
||||
}
|
||||
|
||||
HANDLE m_iocp;
|
||||
|
||||
// The hash containing all the wxFSWatchEntryMSW objects currently being
|
||||
// watched keyed by their paths.
|
||||
wxFSWatchEntries m_watches;
|
||||
|
||||
// Contains the watches which had been removed but are still pending.
|
||||
wxFSWatchEntries m_removedWatches;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -303,20 +303,18 @@
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Default is 1 if compiler supports it. Currently this means not one of the
|
||||
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
|
||||
// needs non-default options for such build to avoid getting "fatal error
|
||||
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
|
||||
// higher limit" in its own standard headers, so you need to ensure you do
|
||||
// increase the heap size before enabling this option for this compiler.
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers and that VC6 needs non-default options for
|
||||
// such build to avoid getting "fatal error C1076: compiler limit : internal
|
||||
// heap limit reached; use /Zm to specify a higher limit" in its own standard
|
||||
// headers, so you need to ensure you do increase the heap size before enabling
|
||||
// this option for this compiler.
|
||||
//
|
||||
// Recommended setting: 1 unless you use a system without good implementation
|
||||
// of STL.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
#else
|
||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
||||
#endif
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
// build and/or the existing code is a concern.
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
|
||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
||||
|
@@ -106,6 +106,10 @@ protected:
|
||||
wxRect GetBoundingBox() const;
|
||||
|
||||
// Get the height and, if the pointers are non NULL, widths of both labels.
|
||||
//
|
||||
// Notice that the return value will be 0 if we don't have wxSL_LABELS
|
||||
// style but we do fill widthMin and widthMax even if we don't have
|
||||
// wxSL_MIN_MAX_LABELS style set so the caller should account for it.
|
||||
int GetLabelsSize(int *widthMin = NULL, int *widthMax = NULL) const;
|
||||
|
||||
|
||||
@@ -123,8 +127,6 @@ protected:
|
||||
int m_pageSize;
|
||||
int m_lineSize;
|
||||
int m_tickFreq;
|
||||
int m_minLabelWidth;
|
||||
int m_maxLabelWidth;
|
||||
|
||||
// flag needed to detect whether we're getting THUMBRELEASE event because
|
||||
// of dragging the thumb or scrolling the mouse wheel
|
||||
|
@@ -15,71 +15,11 @@
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmapToggleButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButtonBase
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wxBitmapToggleButton() { Init(); }
|
||||
wxBitmapToggleButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
// Create the control
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
// Get/set the value
|
||||
void SetValue(bool state);
|
||||
bool GetValue() const;
|
||||
|
||||
// Set the label
|
||||
virtual void SetLabel(const wxString& label) { wxControl::SetLabel(label); }
|
||||
virtual void SetLabel(const wxBitmap& label);
|
||||
bool Enable(bool enable = true);
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
|
||||
wxBitmap m_bitmap;
|
||||
wxBitmap m_disabledBitmap;
|
||||
bool m_capturing;
|
||||
bool m_depressed,m_oldValue;
|
||||
|
||||
void OnPaint(wxPaintEvent &event);
|
||||
void OnMouse(wxMouseEvent &event);
|
||||
void OnChar(wxKeyEvent &event);
|
||||
void OnSize(wxSizeEvent &event);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton)
|
||||
};
|
||||
|
||||
// Checkbox item (single checkbox)
|
||||
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
|
||||
{
|
||||
public:
|
||||
wxToggleButton() {}
|
||||
wxToggleButton() { Init(); }
|
||||
wxToggleButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxString& label,
|
||||
@@ -104,23 +44,68 @@ public:
|
||||
virtual void SetValue(bool value);
|
||||
virtual bool GetValue() const ;
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
virtual State GetNormalState() const;
|
||||
|
||||
// returns true if the platform should explicitly apply a theme border
|
||||
virtual bool CanApplyThemeBorder() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
|
||||
|
||||
void Init();
|
||||
|
||||
// current state of the button (when owner-drawn)
|
||||
bool m_state;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxBitmapToggleButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapToggleButton: public wxToggleButton
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wxBitmapToggleButton() {}
|
||||
wxBitmapToggleButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
// Create the control
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
// deprecated synonym for SetBitmapLabel()
|
||||
wxDEPRECATED_INLINE( void SetLabel(const wxBitmap& bitmap),
|
||||
SetBitmapLabel(bitmap); )
|
||||
// prevent virtual function hiding
|
||||
virtual void SetLabel(const wxString& label) { wxToggleButton::SetLabel(label); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxBitmapToggleButton)
|
||||
};
|
||||
|
||||
#endif // _WX_TOGGLEBUTTON_H_
|
||||
|
||||
|
@@ -303,20 +303,18 @@
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Default is 1 if compiler supports it. Currently this means not one of the
|
||||
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
|
||||
// needs non-default options for such build to avoid getting "fatal error
|
||||
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
|
||||
// higher limit" in its own standard headers, so you need to ensure you do
|
||||
// increase the heap size before enabling this option for this compiler.
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers and that VC6 needs non-default options for
|
||||
// such build to avoid getting "fatal error C1076: compiler limit : internal
|
||||
// heap limit reached; use /Zm to specify a higher limit" in its own standard
|
||||
// headers, so you need to ensure you do increase the heap size before enabling
|
||||
// this option for this compiler.
|
||||
//
|
||||
// Recommended setting: 1 unless you use a system without good implementation
|
||||
// of STL.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
#else
|
||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
||||
#endif
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
// build and/or the existing code is a concern.
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
|
||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
||||
|
@@ -366,7 +366,21 @@ public:
|
||||
bool HandlePower(WXWPARAM wParam, WXLPARAM lParam, bool *vetoed);
|
||||
|
||||
|
||||
// Window procedure
|
||||
// The main body of common window proc for all wxWindow objects. It tries
|
||||
// to handle the given message and returns true if it was handled (the
|
||||
// appropriate return value is then put in result, which must be non-NULL)
|
||||
// or false if it wasn't.
|
||||
//
|
||||
// This function should be overridden in any new code instead of
|
||||
// MSWWindowProc() even if currently most of the code overrides
|
||||
// MSWWindowProc() as it had been written before this function was added.
|
||||
virtual bool MSWHandleMessage(WXLRESULT *result,
|
||||
WXUINT message,
|
||||
WXWPARAM wParam,
|
||||
WXLPARAM lParam);
|
||||
|
||||
// Common Window procedure for all wxWindow objects: forwards to
|
||||
// MSWHandleMessage() and MSWDefWindowProc() if the message wasn't handled.
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
// Calls an appropriate default window procedure
|
||||
|
@@ -303,20 +303,18 @@
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Default is 1 if compiler supports it. Currently this means not one of the
|
||||
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
|
||||
// needs non-default options for such build to avoid getting "fatal error
|
||||
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
|
||||
// higher limit" in its own standard headers, so you need to ensure you do
|
||||
// increase the heap size before enabling this option for this compiler.
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers and that VC6 needs non-default options for
|
||||
// such build to avoid getting "fatal error C1076: compiler limit : internal
|
||||
// heap limit reached; use /Zm to specify a higher limit" in its own standard
|
||||
// headers, so you need to ensure you do increase the heap size before enabling
|
||||
// this option for this compiler.
|
||||
//
|
||||
// Recommended setting: 1 unless you use a system without good implementation
|
||||
// of STL.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
#else
|
||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
||||
#endif
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
// build and/or the existing code is a concern.
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
|
||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
||||
|
59
include/wx/osx/anybutton.h
Normal file
59
include/wx/osx/anybutton.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: anybutton.h
|
||||
// Purpose: wxAnyButton class
|
||||
// Author: Stefan Csomor
|
||||
// Created: 1998-01-01 (extracted from button.h)
|
||||
// RCS-ID: $Id: anybutton.h 67069 2011-02-27 12:48:46Z VZ $
|
||||
// Copyright: (c) Stefan Csomor
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_OSX_ANYBUTTON_H_
|
||||
#define _WX_OSX_ANYBUTTON_H_
|
||||
|
||||
// Any button
|
||||
class WXDLLIMPEXP_CORE wxAnyButton : public wxAnyButtonBase
|
||||
{
|
||||
public:
|
||||
wxAnyButton() {}
|
||||
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const ;
|
||||
|
||||
void OnEnterWindow( wxMouseEvent& event);
|
||||
void OnLeaveWindow( wxMouseEvent& event);
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State which) const;
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
virtual void DoSetBitmapPosition(wxDirection dir);
|
||||
|
||||
virtual void DoSetBitmapMargins(int x, int y)
|
||||
{
|
||||
m_marginX = x;
|
||||
m_marginY = y;
|
||||
InvalidateBestSize();
|
||||
}
|
||||
|
||||
#if wxUSE_MARKUP && wxOSX_USE_COCOA
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP && wxOSX_USE_COCOA
|
||||
|
||||
|
||||
// the margins around the bitmap
|
||||
int m_marginX;
|
||||
int m_marginY;
|
||||
|
||||
// the bitmaps for the different state of the buttons, all of them may be
|
||||
// invalid and the button only shows a bitmap at all if State_Normal bitmap
|
||||
// is valid
|
||||
wxBitmap m_bitmaps[State_Max];
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxAnyButton);
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_ANYBUTTON_H_
|
@@ -41,8 +41,6 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxButtonNameStr);
|
||||
|
||||
static wxSize GetDefaultSize();
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxWindow *SetDefault();
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
@@ -52,38 +50,7 @@ public:
|
||||
virtual bool OSXHandleClicked( double timestampsec );
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const ;
|
||||
|
||||
void OnEnterWindow( wxMouseEvent& event);
|
||||
void OnLeaveWindow( wxMouseEvent& event);
|
||||
|
||||
virtual wxBitmap DoGetBitmap(State which) const;
|
||||
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
||||
virtual void DoSetBitmapPosition(wxDirection dir);
|
||||
|
||||
virtual void DoSetBitmapMargins(int x, int y)
|
||||
{
|
||||
m_marginX = x;
|
||||
m_marginY = y;
|
||||
InvalidateBestSize();
|
||||
}
|
||||
|
||||
#if wxUSE_MARKUP && wxOSX_USE_COCOA
|
||||
virtual bool DoSetLabelMarkup(const wxString& markup);
|
||||
#endif // wxUSE_MARKUP && wxOSX_USE_COCOA
|
||||
|
||||
|
||||
// the margins around the bitmap
|
||||
int m_marginX;
|
||||
int m_marginY;
|
||||
|
||||
// the bitmaps for the different state of the buttons, all of them may be
|
||||
// invalid and the button only shows a bitmap at all if State_Normal bitmap
|
||||
// is valid
|
||||
wxBitmap m_bitmaps[State_Max];
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxButton)
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// OS X specific class, not part of public wx API
|
||||
|
@@ -427,6 +427,8 @@ public:
|
||||
virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height);
|
||||
virtual void OnSize ();
|
||||
|
||||
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
|
||||
|
||||
//
|
||||
// other methods
|
||||
//
|
||||
|
@@ -20,6 +20,8 @@ class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop
|
||||
public:
|
||||
wxGUIEventLoop();
|
||||
|
||||
virtual void WakeUp();
|
||||
|
||||
protected:
|
||||
virtual int DoDispatchTimeout(unsigned long timeout);
|
||||
|
||||
|
@@ -23,6 +23,7 @@ public:
|
||||
wxRegion( WXHRGN hRegion );
|
||||
wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
|
||||
wxRegion();
|
||||
#if wxUSE_IMAGE
|
||||
wxRegion(const wxBitmap& bmp)
|
||||
{
|
||||
Union(bmp);
|
||||
@@ -32,6 +33,7 @@ public:
|
||||
{
|
||||
Union(bmp, transColour, tolerance);
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual ~wxRegion();
|
||||
|
||||
|
@@ -496,6 +496,8 @@ public:
|
||||
wxDataViewColumn*& columnPtr) const;
|
||||
virtual void SetRowHeight(const wxDataViewItem& item, unsigned int height);
|
||||
virtual void OnSize();
|
||||
|
||||
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
|
||||
|
||||
// drag & drop helper methods
|
||||
wxDataFormat GetDnDDataFormat(wxDataObjectComposite* dataObjects);
|
||||
|
@@ -21,6 +21,8 @@ public:
|
||||
|
||||
void EndModalSession();
|
||||
|
||||
virtual void WakeUp();
|
||||
|
||||
protected:
|
||||
virtual int DoDispatchTimeout(unsigned long timeout);
|
||||
|
||||
@@ -31,7 +33,12 @@ protected:
|
||||
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
|
||||
|
||||
void* m_modalSession;
|
||||
|
||||
wxWindow* m_modalWindow;
|
||||
|
||||
WXWindow m_dummyWindow;
|
||||
|
||||
int m_modalNestedLevel;
|
||||
};
|
||||
|
||||
#endif // _WX_OSX_COCOA_EVTLOOP_H_
|
||||
|
@@ -25,7 +25,13 @@ class wxComboBoxChoice;
|
||||
class wxComboWidgetImpl;
|
||||
|
||||
// Combobox item
|
||||
class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
|
||||
class WXDLLIMPEXP_CORE wxComboBox :
|
||||
#if wxOSX_USE_CARBON
|
||||
public wxNavigationEnabled<wxControl>,
|
||||
#else
|
||||
public wxControl,
|
||||
#endif
|
||||
public wxComboBoxBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
||||
|
||||
@@ -42,7 +48,7 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
|
||||
virtual void DelegateTextChanged( const wxString& value );
|
||||
virtual void DelegateChoice( const wxString& value );
|
||||
|
||||
wxComboBox() { Init(); }
|
||||
wxComboBox() { }
|
||||
|
||||
wxComboBox(wxWindow *parent, wxWindowID id,
|
||||
const wxString& value = wxEmptyString,
|
||||
@@ -53,7 +59,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
@@ -66,7 +71,6 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxComboBoxNameStr)
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, value, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
@@ -142,17 +146,12 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
|
||||
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
#endif
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
wxComboWidgetImpl* GetComboPeer() const;
|
||||
#endif
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// List functions
|
||||
virtual void DoDeleteOneItem(unsigned int n);
|
||||
virtual void DoClear();
|
||||
@@ -187,10 +186,6 @@ protected:
|
||||
wxComboBoxChoice* m_choice;
|
||||
|
||||
wxComboBoxDataArray m_datas;
|
||||
|
||||
#if wxOSX_USE_CARBON
|
||||
DECLARE_EVENT_TABLE()
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // _WX_COMBOBOX_H_
|
||||
|
@@ -133,9 +133,9 @@
|
||||
#define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh"
|
||||
#define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org"
|
||||
#define PACKAGE_NAME "wxWidgets"
|
||||
#define PACKAGE_STRING "wxWidgets 2.9.2"
|
||||
#define PACKAGE_STRING "wxWidgets 2.9.3"
|
||||
#define PACKAGE_TARNAME "wxwidgets"
|
||||
#define PACKAGE_VERSION "2.9.2"
|
||||
#define PACKAGE_VERSION "2.9.3"
|
||||
|
||||
// for regex
|
||||
#define WX_NO_REGEX_ADVANCED 1
|
||||
|
@@ -109,6 +109,7 @@ public:
|
||||
virtual void HitTest (wxPoint const& point, wxDataViewItem& item, wxDataViewColumn*& columnPtr) const = 0; // return the item and column pointer that contains with the passed point
|
||||
virtual void SetRowHeight(wxDataViewItem const& item, unsigned int height) = 0; // sets the height of the row containg the passed item in the native control
|
||||
virtual void OnSize (void) = 0; // updates the layout of the native control after a size event
|
||||
virtual void StartEditor( const wxDataViewItem & item, unsigned int column ) = 0; // starts editing the passed in item and column
|
||||
};
|
||||
|
||||
#endif // _WX_DATAVIEWCTRL_CORE_H_
|
||||
|
@@ -201,6 +201,8 @@ public:
|
||||
|
||||
// finishes editing of custom items; if no custom item is currently edited the method does nothing
|
||||
void FinishCustomItemEditing();
|
||||
|
||||
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
|
||||
|
||||
// returns the n-th pointer to a column;
|
||||
// this method is different from GetColumn(unsigned int pos) because here 'n' is not a position in the control but the n-th
|
||||
|
@@ -23,6 +23,10 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const wxString& name = wxDirDialogNameStr);
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
~wxDirDialog();
|
||||
#endif
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
@@ -33,6 +37,10 @@ public:
|
||||
protected:
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDirDialog)
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
WX_NSObject m_sheetDelegate;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -53,9 +53,14 @@ public:
|
||||
AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags);
|
||||
#endif // wxUSE_EVENTLOOP_SOURCE
|
||||
|
||||
void ObserverCallBack(CFRunLoopObserverRef observer, int activity);
|
||||
|
||||
protected:
|
||||
void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity);
|
||||
void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity);
|
||||
|
||||
static void OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info);
|
||||
static void OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info);
|
||||
|
||||
// get the currently executing CFRunLoop
|
||||
virtual CFRunLoopRef CFGetCurrentRunLoop() const;
|
||||
|
||||
@@ -74,8 +79,11 @@ protected:
|
||||
// cfrunloop
|
||||
CFRunLoopRef m_runLoop;
|
||||
|
||||
// runloop observer
|
||||
CFRunLoopObserverRef m_runLoopObserver;
|
||||
// common modes runloop observer
|
||||
CFRunLoopObserverRef m_commonModeRunLoopObserver;
|
||||
|
||||
// default mode runloop observer
|
||||
CFRunLoopObserverRef m_defaultModeRunLoopObserver;
|
||||
|
||||
private:
|
||||
// process all already pending events and dispatch a new one (blocking
|
||||
|
@@ -41,6 +41,10 @@ public:
|
||||
const wxSize& sz = wxDefaultSize,
|
||||
const wxString& name = wxFileDialogNameStr);
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
~wxFileDialog();
|
||||
#endif
|
||||
|
||||
virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
|
||||
virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
|
||||
|
||||
@@ -81,6 +85,7 @@ protected:
|
||||
int m_firstFileTypeFilter;
|
||||
wxArrayString m_currentExtensions;
|
||||
WX_NSObject m_delegate;
|
||||
WX_NSObject m_sheetDelegate;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -22,6 +22,10 @@ public:
|
||||
long style = wxOK|wxCENTRE,
|
||||
const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
~wxMessageDialog();
|
||||
#endif
|
||||
|
||||
virtual int ShowModal();
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
@@ -42,6 +46,9 @@ protected:
|
||||
int m_buttonId[3];
|
||||
int m_buttonCount;
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
WX_NSObject m_sheetDelegate;
|
||||
#endif
|
||||
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
|
||||
};
|
||||
|
||||
|
@@ -304,20 +304,18 @@
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Default is 1 if compiler supports it. Currently this means not one of the
|
||||
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
|
||||
// needs non-default options for such build to avoid getting "fatal error
|
||||
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
|
||||
// higher limit" in its own standard headers, so you need to ensure you do
|
||||
// increase the heap size before enabling this option for this compiler.
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers and that VC6 needs non-default options for
|
||||
// such build to avoid getting "fatal error C1076: compiler limit : internal
|
||||
// heap limit reached; use /Zm to specify a higher limit" in its own standard
|
||||
// headers, so you need to ensure you do increase the heap size before enabling
|
||||
// this option for this compiler.
|
||||
//
|
||||
// Recommended setting: 1 unless you use a system without good implementation
|
||||
// of STL.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
#else
|
||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
||||
#endif
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
// build and/or the existing code is a concern.
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
|
||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
||||
|
@@ -33,7 +33,7 @@ class WXDLLIMPEXP_FWD_CORE wxSpinCtrlButton;
|
||||
// wxSpinCtrl is a combination of wxTextCtrl and wxSpinButton
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSpinCtrl : public wxControl
|
||||
class WXDLLIMPEXP_CORE wxSpinCtrl : public wxNavigationEnabled<wxControl>
|
||||
{
|
||||
public:
|
||||
wxSpinCtrl() { Init(); }
|
||||
@@ -93,8 +93,6 @@ public:
|
||||
// number is out of range
|
||||
bool GetTextValue(int *val) const;
|
||||
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
|
||||
protected:
|
||||
// override the base class virtuals involved into geometry calculations
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
@@ -113,7 +111,6 @@ private:
|
||||
|
||||
int m_oldValue;
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
|
||||
};
|
||||
|
||||
|
@@ -13,53 +13,6 @@
|
||||
#ifndef _WX_TOGGLEBUTTON_H_
|
||||
#define _WX_TOGGLEBUTTON_H_
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButtonBase
|
||||
{
|
||||
public:
|
||||
wxBitmapToggleButton() {}
|
||||
wxBitmapToggleButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
virtual void SetValue(bool value);
|
||||
virtual bool GetValue() const ;
|
||||
|
||||
virtual bool OSXHandleClicked( double timestampsec );
|
||||
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
private:
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
int m_marginX,
|
||||
m_marginY;
|
||||
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
|
||||
};
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxToggleButton : public wxToggleButtonBase
|
||||
{
|
||||
public:
|
||||
@@ -94,11 +47,40 @@ public:
|
||||
|
||||
protected:
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
|
||||
};
|
||||
|
||||
|
||||
class WXDLLIMPEXP_CORE wxBitmapToggleButton : public wxToggleButton
|
||||
{
|
||||
public:
|
||||
wxBitmapToggleButton() {}
|
||||
wxBitmapToggleButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapToggleButton)
|
||||
};
|
||||
|
||||
#endif // _WX_TOGGLEBUTTON_H_
|
||||
|
||||
|
@@ -303,20 +303,18 @@
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Default is 1 if compiler supports it. Currently this means not one of the
|
||||
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
|
||||
// needs non-default options for such build to avoid getting "fatal error
|
||||
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
|
||||
// higher limit" in its own standard headers, so you need to ensure you do
|
||||
// increase the heap size before enabling this option for this compiler.
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers and that VC6 needs non-default options for
|
||||
// such build to avoid getting "fatal error C1076: compiler limit : internal
|
||||
// heap limit reached; use /Zm to specify a higher limit" in its own standard
|
||||
// headers, so you need to ensure you do increase the heap size before enabling
|
||||
// this option for this compiler.
|
||||
//
|
||||
// Recommended setting: 1 unless you use a system without good implementation
|
||||
// of STL.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
#else
|
||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
||||
#endif
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
// build and/or the existing code is a concern.
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
|
||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
||||
|
@@ -28,10 +28,10 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxPanelNameStr[];
|
||||
// wxPanel contains other controls and implements TAB traversal between them
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPanelBase : public wxWindow
|
||||
class WXDLLIMPEXP_CORE wxPanelBase : public wxNavigationEnabled<wxWindow>
|
||||
{
|
||||
public:
|
||||
wxPanelBase();
|
||||
wxPanelBase() { }
|
||||
|
||||
// Derived classes should also provide this constructor:
|
||||
/*
|
||||
@@ -69,14 +69,10 @@ public:
|
||||
|
||||
virtual void InitDialog();
|
||||
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
|
||||
protected:
|
||||
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) = 0;
|
||||
|
||||
private:
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxPanelBase);
|
||||
};
|
||||
|
||||
|
@@ -32,12 +32,12 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxButtonNameStr[];
|
||||
|
||||
#define wxPB_USE_TEXTCTRL 0x0002
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPickerBase : public wxControl
|
||||
class WXDLLIMPEXP_CORE wxPickerBase : public wxNavigationEnabled<wxControl>
|
||||
{
|
||||
public:
|
||||
// ctor: text is the associated text control
|
||||
wxPickerBase() : m_text(NULL), m_picker(NULL), m_sizer(NULL)
|
||||
{ WX_INIT_CONTROL_CONTAINER(); }
|
||||
{ }
|
||||
virtual ~wxPickerBase() {}
|
||||
|
||||
|
||||
@@ -121,8 +121,6 @@ protected:
|
||||
void OnTextCtrlUpdate(wxCommandEvent &);
|
||||
void OnTextCtrlKillFocus(wxFocusEvent &);
|
||||
|
||||
void OnSize(wxSizeEvent &);
|
||||
|
||||
// returns the set of styles for the attached wxTextCtrl
|
||||
// from given wxPickerBase's styles
|
||||
virtual long GetTextCtrlStyle(long style) const
|
||||
@@ -178,10 +176,6 @@ protected:
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxPickerBase)
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
// This class must be something just like a panel...
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
};
|
||||
|
||||
|
||||
|
@@ -182,6 +182,13 @@
|
||||
#include "wx/setup_gccxml.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
Convenience for any optional classes that use the wxAnyButton base class.
|
||||
*/
|
||||
#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
|
||||
#define wxHAS_ANY_BUTTON
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
Hardware platform detection.
|
||||
|
@@ -398,9 +398,26 @@ public:
|
||||
const wxString& name = wxFrameNameStr);
|
||||
virtual ~wxPreviewFrame();
|
||||
|
||||
// Either Initialize() or InitializeWithModality() must be called before
|
||||
// showing the preview frame, the former being just a particular case of
|
||||
// the latter initializing the frame for being showing app-modally.
|
||||
|
||||
// Notice that we must keep Initialize() with its existing signature to
|
||||
// avoid breaking the old code that overrides it and we can't reuse the
|
||||
// same name for the other functions to avoid virtual function hiding
|
||||
// problem and the associated warnings given by some compilers (e.g. from
|
||||
// g++ with -Woverloaded-virtual).
|
||||
virtual void Initialize()
|
||||
{
|
||||
InitializeWithModality(wxPreviewFrame_AppModal);
|
||||
}
|
||||
|
||||
// Also note that this method is not virtual as it doesn't need to be
|
||||
// overridden: it's never called by wxWidgets (of course, the same is true
|
||||
// for Initialize() but, again, it must remain virtual for compatibility).
|
||||
void InitializeWithModality(wxPreviewFrameModalityKind kind);
|
||||
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
virtual void Initialize(wxPreviewFrameModalityKind kind
|
||||
= wxPreviewFrame_AppModal);
|
||||
virtual void CreateCanvas();
|
||||
virtual void CreateControlBar();
|
||||
|
||||
|
@@ -2387,6 +2387,11 @@ protected:
|
||||
void InitAfterAdded( wxPropertyGridPageState* pageState,
|
||||
wxPropertyGrid* propgrid );
|
||||
|
||||
/**
|
||||
Returns true if child property is selected.
|
||||
*/
|
||||
bool IsChildSelected( bool recursive = false ) const;
|
||||
|
||||
// Removes child property with given pointer. Does not delete it.
|
||||
void RemoveChild( wxPGProperty* p );
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@
|
||||
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextHTMLHandler: public wxRichTextFileHandler
|
||||
{
|
||||
DECLARE_CLASS(wxRichTextHTMLHandler)
|
||||
DECLARE_DYNAMIC_CLASS(wxRichTextHTMLHandler)
|
||||
public:
|
||||
wxRichTextHTMLHandler(const wxString& name = wxT("HTML"), const wxString& ext = wxT("html"), int type = wxRICHTEXT_TYPE_HTML);
|
||||
|
||||
|
@@ -60,10 +60,10 @@ public:
|
||||
|
||||
virtual bool ShowHelp(wxWindow* win)
|
||||
{
|
||||
if (m_uiCustomization && m_helpTopic != -1)
|
||||
return m_uiCustomization->ShowHelp(win, m_helpTopic);
|
||||
else
|
||||
if ( !m_uiCustomization || m_helpTopic == -1 )
|
||||
return false;
|
||||
|
||||
return m_uiCustomization->ShowHelp(win, m_helpTopic);
|
||||
}
|
||||
|
||||
/// Get the help topic identifier.
|
||||
|
@@ -30,7 +30,7 @@ class WXDLLIMPEXP_FWD_XML wxXmlDocument;
|
||||
|
||||
class WXDLLIMPEXP_RICHTEXT wxRichTextXMLHandler: public wxRichTextFileHandler
|
||||
{
|
||||
DECLARE_CLASS(wxRichTextXMLHandler)
|
||||
DECLARE_DYNAMIC_CLASS(wxRichTextXMLHandler)
|
||||
public:
|
||||
wxRichTextXMLHandler(const wxString& name = wxT("XML"), const wxString& ext = wxT("xml"), int type = wxRICHTEXT_TYPE_XML)
|
||||
: wxRichTextFileHandler(name, ext, type)
|
||||
|
@@ -144,7 +144,7 @@ WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxString& name);
|
||||
static wxObject* wxCreateObject()
|
||||
|
||||
#define wxDECLARE_CLASS(name) \
|
||||
wxDECLARE_DYNAMIC_CLASS(name)
|
||||
wxDECLARE_ABSTRACT_CLASS(name)
|
||||
|
||||
|
||||
// common part of the macros below
|
||||
|
@@ -299,20 +299,18 @@
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Default is 1 if compiler supports it. Currently this means not one of the
|
||||
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
|
||||
// needs non-default options for such build to avoid getting "fatal error
|
||||
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
|
||||
// higher limit" in its own standard headers, so you need to ensure you do
|
||||
// increase the heap size before enabling this option for this compiler.
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers and that VC6 needs non-default options for
|
||||
// such build to avoid getting "fatal error C1076: compiler limit : internal
|
||||
// heap limit reached; use /Zm to specify a higher limit" in its own standard
|
||||
// headers, so you need to ensure you do increase the heap size before enabling
|
||||
// this option for this compiler.
|
||||
//
|
||||
// Recommended setting: 1 unless you use a system without good implementation
|
||||
// of STL.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
#else
|
||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
||||
#endif
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
// build and/or the existing code is a concern.
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
|
||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
||||
|
@@ -26,8 +26,11 @@
|
||||
// no native version, use the generic one
|
||||
#define wxUSE_NATIVE_SEARCH_CONTROL 0
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSearchCtrlBaseBaseClass : public wxControl,
|
||||
public wxTextCtrlIface
|
||||
#include "wx/containr.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSearchCtrlBaseBaseClass
|
||||
: public wxNavigationEnabled<wxControl>,
|
||||
public wxTextCtrlIface
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
@@ -66,9 +66,9 @@ public:
|
||||
wxStringOutputStream(wxString *pString = NULL,
|
||||
wxMBConv& conv = wxConvUTF8)
|
||||
: m_conv(conv)
|
||||
#if wxUSE_UNICODE_WCHAR
|
||||
#if wxUSE_UNICODE
|
||||
, m_unconv(0)
|
||||
#endif // wxUSE_UNICODE_WCHAR
|
||||
#endif // wxUSE_UNICODE
|
||||
{
|
||||
m_str = pString ? pString : &m_strInternal;
|
||||
m_pos = m_str->length() / sizeof(wxChar);
|
||||
@@ -98,10 +98,10 @@ private:
|
||||
// arbitrary 8 bit data
|
||||
wxMBConv& m_conv;
|
||||
|
||||
#if wxUSE_UNICODE_WCHAR
|
||||
#if wxUSE_UNICODE
|
||||
// unconverted data from the last call to OnSysWrite()
|
||||
wxMemoryBuffer m_unconv;
|
||||
#endif // wxUSE_UNICODE_WCHAR
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxStringOutputStream);
|
||||
};
|
||||
|
@@ -3056,19 +3056,19 @@ public:
|
||||
// Set the display mode of visual flags for wrapped lines.
|
||||
void SetWrapVisualFlags(int wrapVisualFlags);
|
||||
|
||||
// Retrieve the display mode of visual flags for wrapped lines.
|
||||
// Retrive the display mode of visual flags for wrapped lines.
|
||||
int GetWrapVisualFlags() const;
|
||||
|
||||
// Set the location of visual flags for wrapped lines.
|
||||
void SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation);
|
||||
|
||||
// Retrieve the location of visual flags for wrapped lines.
|
||||
// Retrive the location of visual flags for wrapped lines.
|
||||
int GetWrapVisualFlagsLocation() const;
|
||||
|
||||
// Set the start indent for wrapped lines.
|
||||
void SetWrapStartIndent(int indent);
|
||||
|
||||
// Retrieve the start indent for wrapped lines.
|
||||
// Retrive the start indent for wrapped lines.
|
||||
int GetWrapStartIndent() const;
|
||||
|
||||
// Sets how wrapped sublines are placed. Default is fixed.
|
||||
@@ -3464,7 +3464,7 @@ public:
|
||||
// Delete forwards from the current position to the end of the line.
|
||||
void DelLineRight();
|
||||
|
||||
// Get and Set the xOffset (ie, horizontal scroll position).
|
||||
// Get and Set the xOffset (ie, horizonal scroll position).
|
||||
void SetXOffset(int newOffset);
|
||||
int GetXOffset() const;
|
||||
|
||||
|
@@ -64,7 +64,7 @@ public:
|
||||
bool operator!() const { return !IsOk(); }
|
||||
|
||||
// reset the stream state
|
||||
void Reset() { m_lasterror = wxSTREAM_NO_ERROR; }
|
||||
void Reset(wxStreamError error = wxSTREAM_NO_ERROR) { m_lasterror = error; }
|
||||
|
||||
// this doesn't make sense for all streams, always test its return value
|
||||
virtual size_t GetSize() const;
|
||||
|
@@ -825,7 +825,7 @@ WX_ARG_NORMALIZER_FORWARD(const signed char&, signed char);
|
||||
#undef WX_ARG_NORMALIZER_FORWARD
|
||||
#undef _WX_ARG_NORMALIZER_FORWARD_IMPL
|
||||
|
||||
#undef wxASSERT_ARG_TYPE
|
||||
// NB: Don't #undef wxASSERT_ARG_TYPE here as it's also used in wx/longlong.h.
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// WX_VA_ARG_STRING
|
||||
|
@@ -379,8 +379,8 @@ public:
|
||||
int GetOutlineLevel() const { return m_outlineLevel; }
|
||||
|
||||
// accessors
|
||||
bool HasTextColour() const { return m_colText.Ok() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; }
|
||||
bool HasBackgroundColour() const { return m_colBack.Ok() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; }
|
||||
bool HasTextColour() const { return m_colText.IsOk() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; }
|
||||
bool HasBackgroundColour() const { return m_colBack.IsOk() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; }
|
||||
bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) && HasFlag(wxTEXT_ATTR_ALIGNMENT) ; }
|
||||
bool HasTabs() const { return HasFlag(wxTEXT_ATTR_TABS) ; }
|
||||
bool HasLeftIndent() const { return HasFlag(wxTEXT_ATTR_LEFT_INDENT); }
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#if wxUSE_TOGGLEBTN
|
||||
|
||||
#include "wx/event.h"
|
||||
#include "wx/control.h" // base class
|
||||
#include "wx/anybutton.h" // base class
|
||||
|
||||
extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[];
|
||||
|
||||
@@ -28,7 +28,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED,
|
||||
// wxToggleButtonBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxToggleButtonBase : public wxControl
|
||||
class WXDLLIMPEXP_CORE wxToggleButtonBase : public wxAnyButton
|
||||
{
|
||||
public:
|
||||
wxToggleButtonBase() { }
|
||||
|
@@ -157,7 +157,8 @@ enum
|
||||
// wxTopLevelWindow: a top level (as opposed to child) window
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxTopLevelWindowBase : public wxNonOwnedWindow
|
||||
class WXDLLIMPEXP_CORE wxTopLevelWindowBase :
|
||||
public wxNavigationEnabled<wxNonOwnedWindow>
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
@@ -352,7 +353,6 @@ protected:
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxTopLevelWindowBase);
|
||||
DECLARE_EVENT_TABLE()
|
||||
WX_DECLARE_CONTROL_CONTAINER();
|
||||
};
|
||||
|
||||
|
||||
|
@@ -252,9 +252,9 @@ public:
|
||||
void SetFont(const wxFont& font) { m_font = font; }
|
||||
|
||||
// accessors
|
||||
bool HasTextColour() const { return m_colText.Ok(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.Ok(); }
|
||||
bool HasFont() const { return m_font.Ok(); }
|
||||
bool HasTextColour() const { return m_colText.IsOk(); }
|
||||
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
|
||||
bool HasFont() const { return m_font.IsOk(); }
|
||||
|
||||
const wxColour& GetTextColour() const { return m_colText; }
|
||||
const wxColour& GetBackgroundColour() const { return m_colBack; }
|
||||
|
@@ -302,20 +302,18 @@
|
||||
// usually more limited) implementations are used which allows to avoid the
|
||||
// dependency on the C++ run-time library.
|
||||
//
|
||||
// Default is 1 if compiler supports it. Currently this means not one of the
|
||||
// compilers mentioned in wxUSE_STD_DEFAULT comment and also not VC6 as it
|
||||
// needs non-default options for such build to avoid getting "fatal error
|
||||
// C1076: compiler limit : internal heap limit reached; use /Zm to specify a
|
||||
// higher limit" in its own standard headers, so you need to ensure you do
|
||||
// increase the heap size before enabling this option for this compiler.
|
||||
// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't
|
||||
// support using standard containers and that VC6 needs non-default options for
|
||||
// such build to avoid getting "fatal error C1076: compiler limit : internal
|
||||
// heap limit reached; use /Zm to specify a higher limit" in its own standard
|
||||
// headers, so you need to ensure you do increase the heap size before enabling
|
||||
// this option for this compiler.
|
||||
//
|
||||
// Recommended setting: 1 unless you use a system without good implementation
|
||||
// of STL.
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
#else
|
||||
#define wxUSE_STD_CONTAINERS wxUSE_STD_DEFAULT
|
||||
#endif
|
||||
// Default is 0 for compatibility reasons.
|
||||
//
|
||||
// Recommended setting: 1 unless compatibility with the official wxWidgets
|
||||
// build and/or the existing code is a concern.
|
||||
#define wxUSE_STD_CONTAINERS 0
|
||||
|
||||
// Use standard C++ streams if 1 instead of wx streams in some places. If
|
||||
// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the
|
||||
|
@@ -16,6 +16,7 @@
|
||||
#if wxUSE_VALIDATORS
|
||||
|
||||
class WXDLLIMPEXP_FWD_BASE wxDateTime;
|
||||
class WXDLLIMPEXP_FWD_BASE wxFileName;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGenericValidator performs data transfer between many standard controls and
|
||||
@@ -42,6 +43,13 @@ public:
|
||||
// wxDatePickerCtrl
|
||||
wxGenericValidator(wxDateTime* val);
|
||||
#endif // wxUSE_DATETIME
|
||||
// wxTextCtrl
|
||||
wxGenericValidator(wxFileName* val);
|
||||
// wxTextCtrl
|
||||
wxGenericValidator(float* val);
|
||||
// wxTextCtrl
|
||||
wxGenericValidator(double* val);
|
||||
|
||||
wxGenericValidator(const wxGenericValidator& copyFrom);
|
||||
|
||||
virtual ~wxGenericValidator(){}
|
||||
@@ -73,6 +81,9 @@ protected:
|
||||
#if wxUSE_DATETIME
|
||||
wxDateTime* m_pDateTime;
|
||||
#endif // wxUSE_DATETIME
|
||||
wxFileName* m_pFileName;
|
||||
float* m_pFloat;
|
||||
double* m_pDouble;
|
||||
|
||||
private:
|
||||
DECLARE_CLASS(wxGenericValidator)
|
||||
|
@@ -28,9 +28,9 @@
|
||||
/* NB: this file is parsed by automatic tools so don't change its format! */
|
||||
#define wxMAJOR_VERSION 2
|
||||
#define wxMINOR_VERSION 9
|
||||
#define wxRELEASE_NUMBER 2
|
||||
#define wxRELEASE_NUMBER 3
|
||||
#define wxSUBRELEASE_NUMBER 0
|
||||
#define wxVERSION_STRING wxT("wxWidgets 2.9.2")
|
||||
#define wxVERSION_STRING wxT("wxWidgets 2.9.3")
|
||||
|
||||
/* nothing to update below this line when updating the version */
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
|
@@ -188,9 +188,12 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size );
|
||||
#endif /* __WXWINCE__ */
|
||||
|
||||
/* Almost all compiler have strdup(), but not quite all: CodeWarrior under
|
||||
Mac and VC++ for Windows CE don't provide it; additionally, gcc under
|
||||
Mac and OpenVMS do not have wcsdup: */
|
||||
#if defined(__VISUALC__) && __VISUALC__ >= 1400
|
||||
Mac and VC++ for Windows CE don't provide it. Another special case is gcc in
|
||||
strict ANSI mode: normally it doesn't provide strdup() but MinGW does
|
||||
provide it under MSVC-compatible name so test for it before checking
|
||||
__WX_STRICT_ANSI_GCC__. */
|
||||
#if (defined(__VISUALC__) && __VISUALC__ >= 1400) || \
|
||||
defined(__MINGW32__)
|
||||
#define wxCRT_StrdupA _strdup
|
||||
#elif !((defined(__MWERKS__) && defined(__WXMAC__)) || \
|
||||
defined(__WXWINCE__) || \
|
||||
|
Reference in New Issue
Block a user