Merge in from trunk r64802 - r68625

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-08-10 18:10:42 +00:00
97 changed files with 2524 additions and 1712 deletions

View File

@@ -10,6 +10,10 @@
#ifndef _WX_AFFINEMATRIX2D_H_
#define _WX_AFFINEMATRIX2D_H_
#include "wx/defs.h"
#if wxUSE_GEOMETRY
#include "wx/affinematrix2dbase.h"
// A simple implementation of wxAffineMatrix2DBase interface done entirely in
@@ -42,4 +46,6 @@ private:
wxDouble m_11, m_12, m_21, m_22, m_tx, m_ty;
};
#endif // wxUSE_GEOMETRY
#endif // _WX_AFFINEMATRIX2D_H_

View File

@@ -11,6 +11,9 @@
#define _WX_AFFINEMATRIX2DBASE_H_
#include "wx/defs.h"
#if wxUSE_GEOMETRY
#include "wx/geometry.h"
struct wxMatrix2D
@@ -37,7 +40,7 @@ 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;
@@ -119,4 +122,6 @@ protected:
wxPoint2DDouble DoTransformDistance(const wxPoint2DDouble& p) const = 0;
};
#endif // wxUSE_GEOMETRY
#endif // _WX_AFFINEMATRIX2DBASE_H_

View File

@@ -14,6 +14,11 @@
#include "wx/defs.h"
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
// We need wxEVT_XXX declarations in this case.
#include "wx/event.h"
#endif
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxWindowBase;
@@ -116,9 +121,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
// ----------------------------------------------------------------------------
@@ -166,13 +168,13 @@ public:
m_container.SetContainerWindow(this);
#ifndef wxHAS_NATIVE_TAB_TRAVERSAL
Connect(wxEVT_NAVIGATION_KEY,
BaseWindowClass::Connect(wxEVT_NAVIGATION_KEY,
wxNavigationKeyEventHandler(wxNavigationEnabled::OnNavigationKey));
Connect(wxEVT_SET_FOCUS,
BaseWindowClass::Connect(wxEVT_SET_FOCUS,
wxFocusEventHandler(wxNavigationEnabled::OnFocus));
Connect(wxEVT_CHILD_FOCUS,
BaseWindowClass::Connect(wxEVT_CHILD_FOCUS,
wxChildFocusEventHandler(wxNavigationEnabled::OnChildFocus));
#endif // !wxHAS_NATIVE_TAB_TRAVERSAL
}

View File

@@ -395,41 +395,48 @@ private:
wxClientDataType m_clientDataItemsType;
};
// this macro must (unfortunately) be used in any class deriving from both
// wxItemContainer and wxControl because otherwise there is ambiguity when
// calling GetClientXXX() functions -- the compiler can't choose between the
// two versions
#define wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST \
void SetClientData(void *data) \
{ wxEvtHandler::SetClientData(data); } \
void *GetClientData() const \
{ return wxEvtHandler::GetClientData(); } \
void SetClientObject(wxClientData *data) \
{ wxEvtHandler::SetClientObject(data); } \
wxClientData *GetClientObject() const \
{ return wxEvtHandler::GetClientObject(); } \
void SetClientData(unsigned int n, void* clientData) \
{ wxItemContainer::SetClientData(n, clientData); } \
void* GetClientData(unsigned int n) const \
{ return wxItemContainer::GetClientData(n); } \
void SetClientObject(unsigned int n, wxClientData* clientData) \
{ wxItemContainer::SetClientObject(n, clientData); } \
wxClientData* GetClientObject(unsigned int n) const \
{ return wxItemContainer::GetClientObject(n); }
// Inheriting directly from a wxWindow-derived class and wxItemContainer
// unfortunately introduces an ambiguity for all GetClientXXX() methods as they
// are inherited twice: the "global" versions from wxWindow and the per-item
// versions taking the index from wxItemContainer.
//
// So we need to explicitly resolve them and this helper template class is
// provided to do it. To use it, simply inherit from wxWindowWithItems<Window,
// Container> instead of Window and Container interface directly.
template <class W, class C>
class wxWindowWithItems : public W, public C
{
public:
typedef W BaseWindowClass;
typedef C BaseContainerInterface;
class WXDLLIMPEXP_CORE wxControlWithItemsBase : public wxControl,
public wxItemContainer
wxWindowWithItems() { }
void SetClientData(void *data)
{ BaseWindowClass::SetClientData(data); }
void *GetClientData() const
{ return BaseWindowClass::GetClientData(); }
void SetClientObject(wxClientData *data)
{ BaseWindowClass::SetClientObject(data); }
wxClientData *GetClientObject() const
{ return BaseWindowClass::GetClientObject(); }
void SetClientData(unsigned int n, void* clientData)
{ wxItemContainer::SetClientData(n, clientData); }
void* GetClientData(unsigned int n) const
{ return wxItemContainer::GetClientData(n); }
void SetClientObject(unsigned int n, wxClientData* clientData)
{ wxItemContainer::SetClientObject(n, clientData); }
wxClientData* GetClientObject(unsigned int n) const
{ return wxItemContainer::GetClientObject(n); }
};
class WXDLLIMPEXP_CORE wxControlWithItemsBase :
public wxWindowWithItems<wxControl, wxItemContainer>
{
public:
wxControlWithItemsBase() { }
// we have to redefine these functions here to avoid ambiguities in classes
// deriving from us which would arise otherwise because both base classses
// have the methods with the same names - hopefully, a smart compiler can
// optimize away these simple inline wrappers so we don't suffer much from
// this
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
// usually the controls like list/combo boxes have their own background
// colour
virtual bool ShouldInheritColours() const { return false; }

View File

@@ -81,10 +81,11 @@ extern WXDLLIMPEXP_DATA_ADV(const char) wxDataViewCtrlNameStr[];
class WXDLLIMPEXP_ADV wxDataViewItem
{
public:
wxDataViewItem( void* id = NULL )
{ m_id = id; }
wxDataViewItem( const wxDataViewItem &item )
{ m_id = item.m_id; }
wxDataViewItem() : m_id(NULL) {}
wxDataViewItem(const wxDataViewItem &item) : m_id(item.m_id) {}
wxEXPLICIT wxDataViewItem(void* id) : m_id(id) {}
bool IsOk() const { return m_id != NULL; }
void* GetID() const { return m_id; }
operator const void* () const { return m_id; }

View File

@@ -190,14 +190,6 @@ public:
virtual void StartEditor( const wxDataViewItem & item, unsigned int column );
protected:
virtual int GetSelections( wxArrayInt & sel ) const;
virtual void SetSelections( const wxArrayInt & sel );
virtual void Select( int row );
virtual void Unselect( int row );
virtual bool IsSelected( int row ) const;
virtual void SelectRange( int from, int to );
virtual void UnselectRange( int from, int to );
virtual void EnsureVisible( int row, int column );
virtual wxDataViewItem GetItemByRow( unsigned int row ) const;

View File

@@ -32,6 +32,7 @@ protected:
void OnYes(wxCommandEvent& event);
void OnNo(wxCommandEvent& event);
void OnHelp(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);
// can be overridden to provide more contents to the dialog

View File

@@ -40,6 +40,7 @@ private:
virtual wxString GetDefaultNoLabel() const;
virtual wxString GetDefaultOKLabel() const;
virtual wxString GetDefaultCancelLabel() const;
virtual wxString GetDefaultHelpLabel() const;
// create the real GTK+ dialog: this is done from ShowModal() to allow
// changing the message between constructing the dialog and showing it

View File

@@ -167,6 +167,8 @@ protected:
virtual void DoSetValue(const wxString &value, int flags = 0);
virtual wxPoint DoPositionToCoords(long pos) const;
// wrappers hiding the differences between functions doing the same thing
// for GtkTextView and GtkEntry (all of them use current window style to
// set the given characteristic)

View File

@@ -34,7 +34,8 @@ extern WXDLLIMPEXP_BASE const wxChar* wxEmptyString;
// wxComboBox
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase
class WXDLLIMPEXP_CORE wxComboBox :
public wxWindowWithItems<wxControl, wxComboBoxBase>
{
public:
inline wxComboBox() {}
@@ -154,8 +155,6 @@ public:
bool IsOwnGtkWindow( GdkWindow *window );
void DoApplyWidgetStyle(GtkRcStyle *style);
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);

View File

@@ -196,8 +196,8 @@ private:
#define wxHLB_DEFAULT_STYLE wxBORDER_SUNKEN
#define wxHLB_MULTIPLE wxLB_MULTIPLE
class WXDLLIMPEXP_HTML wxSimpleHtmlListBox : public wxHtmlListBox,
public wxItemContainer
class WXDLLIMPEXP_HTML wxSimpleHtmlListBox :
public wxWindowWithItems<wxHtmlListBox, wxItemContainer>
{
DECLARE_ABSTRACT_CLASS(wxSimpleHtmlListBox)
public:
@@ -254,9 +254,6 @@ public:
int GetSelection() const
{ return wxVListBox::GetSelection(); }
// see ctrlsub.h for more info about this:
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
// accessing strings
// -----------------

View File

@@ -1097,15 +1097,15 @@ WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &st
namespace std
{
template<> class numeric_limits<wxLongLong>
: public numeric_limits<wxLongLong_t>
{
};
template<> class numeric_limits<wxULongLong>
: public numeric_limits<wxULongLong_t>
{
};
#ifdef __clang__
// libstdc++ (used by Clang) uses struct for numeric_limits; unlike gcc, clang
// warns about this
template<> struct numeric_limits<wxLongLong> : public numeric_limits<wxLongLong_t> {};
template<> struct numeric_limits<wxULongLong> : public numeric_limits<wxULongLong_t> {};
#else
template<> class numeric_limits<wxLongLong> : public numeric_limits<wxLongLong_t> {};
template<> class numeric_limits<wxULongLong> : public numeric_limits<wxULongLong_t> {};
#endif
} // namespace std

View File

@@ -176,6 +176,11 @@ public:
// level windows too
virtual bool IsTopLevel() const { return false; }
// In all ports keyboard navigation must stop at MDI child frame level and
// can't cross its boundary. Indicate this by overriding this function to
// return true.
virtual bool IsTopNavigationDomain() const { return true; }
protected:
wxMDIParentFrame *m_mdiParent;
};

View File

@@ -177,10 +177,16 @@ public:
return true;
}
virtual bool SetHelpLabel(const ButtonLabel& help)
{
DoSetCustomLabel(m_help, help);
return true;
}
// test if any custom labels were set
bool HasCustomLabels() const
{
return !(m_ok.empty() && m_cancel.empty() &&
return !(m_ok.empty() && m_cancel.empty() && m_help.empty() &&
m_yes.empty() && m_no.empty());
}
@@ -195,6 +201,8 @@ public:
{ return m_ok.empty() ? GetDefaultOKLabel() : m_ok; }
wxString GetCancelLabel() const
{ return m_cancel.empty() ? GetDefaultCancelLabel() : m_cancel; }
wxString GetHelpLabel() const
{ return m_help.empty() ? GetDefaultHelpLabel() : m_help; }
// based on message dialog style, returns exactly one of: wxICON_NONE,
// wxICON_ERROR, wxICON_WARNING, wxICON_QUESTION, wxICON_INFORMATION
@@ -250,6 +258,7 @@ protected:
const wxString& GetCustomYesLabel() const { return m_yes; }
const wxString& GetCustomNoLabel() const { return m_no; }
const wxString& GetCustomOKLabel() const { return m_ok; }
const wxString& GetCustomHelpLabel() const { return m_help; }
const wxString& GetCustomCancelLabel() const { return m_cancel; }
private:
@@ -259,13 +268,15 @@ private:
virtual wxString GetDefaultNoLabel() const { return wxGetTranslation("No"); }
virtual wxString GetDefaultOKLabel() const { return wxGetTranslation("OK"); }
virtual wxString GetDefaultCancelLabel() const { return wxGetTranslation("Cancel"); }
virtual wxString GetDefaultHelpLabel() const { return wxGetTranslation("Help"); }
// labels for the buttons, initially empty meaning that the defaults should
// be used, use GetYes/No/OK/CancelLabel() to access them
wxString m_yes,
m_no,
m_ok,
m_cancel;
m_cancel,
m_help;
wxDECLARE_NO_COPY_CLASS(wxMessageDialogBase);
};

View File

@@ -61,6 +61,14 @@ public:
virtual void SetTitle(const wxString& title);
// MSW-only methods
// ----------------
// Create a new menu from the given native HMENU. Takes ownership of the
// menu handle and will delete it when this object is destroyed.
static wxMenu *MSWNewFromHMENU(WXHMENU hMenu) { return new wxMenu(hMenu); }
// implementation only from now on
// -------------------------------
@@ -120,7 +128,14 @@ protected:
virtual wxMenuItem* DoRemove(wxMenuItem *item);
private:
// common part of all ctors
// This constructor is private, use MSWNewFromHMENU() to use it.
wxMenu(WXHMENU hMenu);
// Common part of all ctors, it doesn't create a new HMENU.
void InitNoCreate();
// Common part of all ctors except of the one above taking a native menu
// handler: calls InitNoCreate() and also creates a new menu.
void Init();
// common part of Append/Insert (behaves as Append is pos == (size_t)-1)

View File

@@ -20,6 +20,7 @@
#include "wx/printdlg.h"
class WXDLLIMPEXP_FWD_CORE wxDC;
class WinPrinter;
//----------------------------------------------------------------------------
// wxWindowsPrintNativeData
@@ -37,6 +38,7 @@ public:
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const;
void InitializeDevMode(const wxString &printerName = wxEmptyString, WinPrinter* printer = NULL);
void* GetDevMode() const { return m_devMode; }
void SetDevMode(void* data) { m_devMode = data; }
void* GetDevNames() const { return m_devNames; }

View File

@@ -30,8 +30,10 @@ namespace wxMSWMessageDialog
class wxMSWTaskDialogConfig
{
public:
enum { MAX_BUTTONS = 4 };
wxMSWTaskDialogConfig()
: buttons(new TASKDIALOG_BUTTON[3]),
: buttons(new TASKDIALOG_BUTTON[MAX_BUTTONS]),
parent(NULL),
iconId(0),
style(0),
@@ -53,6 +55,7 @@ namespace wxMSWMessageDialog
wxString btnNoLabel;
wxString btnOKLabel;
wxString btnCancelLabel;
wxString btnHelpLabel;
// Will create a task dialog with it's paremeters for it's creation
// stored in the provided TASKDIALOGCONFIG parameter.

View File

@@ -198,6 +198,8 @@ protected:
virtual void DoSetValue(const wxString &value, int flags = 0);
virtual wxPoint DoPositionToCoords(long pos) const;
// return true if this control has a user-set limit on amount of text (i.e.
// the limit is due to a previous call to SetMaxLength() and not built in)
bool HasSpaceLimit(unsigned int *len) const;

View File

@@ -77,6 +77,19 @@ public:
virtual bool CanSetTransparent();
// MSW-specific methods
// --------------------
// Return the menu representing the "system" menu of the window. You can
// call wxMenu::AppendWhatever() methods on it but removing items from it
// is in general not a good idea.
//
// The pointer returned by this method belongs to the window and will be
// deleted when the window itself is, do not delete it yourself. May return
// NULL if getting the system menu failed.
wxMenu *MSWGetSystemMenu() const;
// implementation from now on
// --------------------------
@@ -214,6 +227,10 @@ private:
void* m_activateInfo;
#endif
// The system menu: initially NULL but can be set (once) by
// MSWGetSystemMenu(). Owned by this window.
wxMenu *m_menuSystem;
DECLARE_EVENT_TABLE()
wxDECLARE_NO_COPY_CLASS(wxTopLevelWindowMSW);
};

View File

@@ -233,15 +233,15 @@ private:
// the wxComboCtrl.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : public wxComboCtrl,
public wxItemContainer
class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox :
public wxWindowWithItems<wxComboCtrl, wxItemContainer>
{
//friend class wxComboPopupWindow;
friend class wxVListBoxComboPopup;
public:
// ctors and such
wxOwnerDrawnComboBox() : wxComboCtrl() { Init(); }
wxOwnerDrawnComboBox() { Init(); }
wxOwnerDrawnComboBox(wxWindow *parent,
wxWindowID id,
@@ -253,7 +253,6 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
: wxComboCtrl()
{
Init();
@@ -339,8 +338,6 @@ public:
virtual bool IsSorted() const { return HasFlag(wxCB_SORT); }
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
protected:
virtual void DoClear();
virtual void DoDeleteOneItem(unsigned int n);

View File

@@ -122,7 +122,10 @@ public:
virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual short MacHandleAERApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
#endif
// in response of an open-document apple event
// in response of an openFiles message with Cocoa and an
// open-document apple event with Carbon
virtual void MacOpenFiles(const wxArrayString &fileNames) ;
// called by MacOpenFiles for each file.
virtual void MacOpenFile(const wxString &fileName) ;
// in response of a get-url apple event
virtual void MacOpenURL(const wxString &url) ;

View File

@@ -26,12 +26,13 @@ class wxComboWidgetImpl;
// Combobox item
class WXDLLIMPEXP_CORE wxComboBox :
public wxWindowWithItems<
#if wxOSX_USE_CARBON
public wxNavigationEnabled<wxControl>,
wxNavigationEnabled<wxControl>,
#else
public wxControl,
wxControl,
#endif
public wxComboBoxBase
wxComboBoxBase>
{
DECLARE_DYNAMIC_CLASS(wxComboBox)
@@ -144,10 +145,6 @@ class WXDLLIMPEXP_CORE wxComboBox :
virtual bool OSXHandleClicked( double timestampsec );
#if wxOSX_USE_CARBON
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
#endif
#if wxOSX_USE_COCOA
wxComboWidgetImpl* GetComboPeer() const;
#endif

View File

@@ -56,6 +56,7 @@ private:
bool GetMimeTypes(const wxString& uti, wxArrayString& mimeTypes);
bool GetIcon(const wxString& uti, wxIconLocation *iconLoc);
bool GetDescription(const wxString& uti, wxString *desc);
bool GetApplication(const wxString& uti, wxString *command);
// Structure to represent file types
typedef struct FileTypeData
@@ -63,6 +64,7 @@ private:
wxArrayString extensions;
wxArrayString mimeTypes;
wxIconLocation iconLoc;
wxString application;
wxString description;
}
FileTypeInfo;
@@ -95,9 +97,9 @@ public:
bool GetMimeTypes(wxArrayString& mimeTypes) const ;
bool GetIcon(wxIconLocation *iconLoc) const ;
bool GetDescription(wxString *desc) const ;
bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const;
// These functions are only stubs on Mac OS X
bool GetOpenCommand(wxString *openCmd, const wxFileType::MessageParameters& params) const;
bool GetPrintCommand(wxString *printCmd, const wxFileType::MessageParameters& params) const;
size_t GetAllCommands(wxArrayString *verbs, wxArrayString *commands, const wxFileType::MessageParameters& params) const;
bool SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt = TRUE);

View File

@@ -43,7 +43,7 @@ protected:
void* ConstructNSAlert();
#endif
int m_buttonId[3];
int m_buttonId[4];
int m_buttonCount;
#if wxOSX_USE_COCOA

View File

@@ -134,7 +134,9 @@ public:
wxComboBox* m_styleCtrl;
wxComboBox* m_weightCtrl;
wxComboBox* m_underliningCtrl;
wxCheckBox* m_textColourLabel;
wxRichTextColourSwatchCtrl* m_colourCtrl;
wxCheckBox* m_bgColourLabel;
wxRichTextColourSwatchCtrl* m_bgColourCtrl;
wxCheckBox* m_strikethroughCtrl;
wxCheckBox* m_capitalsCtrl;
@@ -151,7 +153,9 @@ public:
ID_RICHTEXTFONTPAGE_STYLECTRL = 10007,
ID_RICHTEXTFONTPAGE_WEIGHTCTRL = 10004,
ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL = 10008,
ID_RICHTEXTFONTPAGE_COLOURCTRL_LABEL = 10015,
ID_RICHTEXTFONTPAGE_COLOURCTRL = 10009,
ID_RICHTEXTFONTPAGE_BGCOLOURCTRL_LABEL = 10016,
ID_RICHTEXTFONTPAGE_BGCOLOURCTRL = 10014,
ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL = 10010,
ID_RICHTEXTFONTPAGE_CAPSCTRL = 10011,

View File

@@ -141,6 +141,7 @@ public:
wxTextCtrl* m_spacingBefore;
wxTextCtrl* m_spacingAfter;
wxComboBox* m_spacingLine;
wxCheckBox* m_pageBreakCtrl;
wxRichTextCtrl* m_previewCtrl;
/// Control identifiers
enum {
@@ -157,6 +158,7 @@ public:
ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE = 10114,
ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER = 10116,
ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE = 10115,
ID_RICHTEXTINDENTSSPACINGPAGE_PAGEBREAK = 10106,
ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL = 10109
};
////@end wxRichTextIndentsSpacingPage member variables

View File

@@ -574,6 +574,11 @@ public:
virtual long XYToPosition(long x, long y) const = 0;
virtual bool PositionToXY(long pos, long *x, long *y) const = 0;
// translate the given position (which is just an index in the text control)
// to client coordinates
wxPoint PositionToCoords(long pos) const;
virtual void ShowPosition(long pos) = 0;
// find the character at position given in pixels
@@ -592,6 +597,13 @@ protected:
virtual bool DoLoadFile(const wxString& file, int fileType);
virtual bool DoSaveFile(const wxString& file, int fileType);
// Return true if the given position is valid, i.e. positive and less than
// the last position.
virtual bool IsValidPosition(long pos) const = 0;
// Default stub implementation of PositionToCoords() always returns
// wxDefaultPosition.
virtual wxPoint DoPositionToCoords(long pos) const;
// the name of the last file loaded with LoadFile() which will be used by
// SaveFile() by default
@@ -625,6 +637,12 @@ public:
wxTextEntryBase::SetValue(value);
}
protected:
virtual bool IsValidPosition(long pos) const
{
return pos >= 0 && pos <= GetLastPosition();
}
private:
wxDECLARE_NO_COPY_CLASS(wxTextCtrlIface);
};
@@ -723,6 +741,12 @@ protected:
virtual bool DoLoadFile(const wxString& file, int fileType);
virtual bool DoSaveFile(const wxString& file, int fileType);
// Another wxTextAreaBase override.
virtual bool IsValidPosition(long pos) const
{
return pos >= 0 && pos <= GetLastPosition();
}
// implement the wxTextEntry pure virtual method
virtual wxWindow *GetEditableWindow() { return this; }

View File

@@ -282,6 +282,7 @@ public:
// override some base class virtuals
virtual bool Destroy();
virtual bool IsTopLevel() const { return true; }
virtual bool IsTopNavigationDomain() const { return true; }
virtual bool IsVisible() const { return IsShown(); }
// event handlers

View File

@@ -34,7 +34,8 @@ class WXDLLIMPEXP_FWD_CORE wxListBox;
// NB: Normally we'd like wxComboBox to inherit from wxComboBoxBase, but here
// we can't really do that since both wxComboBoxBase and wxComboCtrl inherit
// from wxTextCtrl.
class WXDLLIMPEXP_CORE wxComboBox : public wxComboCtrl, public wxItemContainer
class WXDLLIMPEXP_CORE wxComboBox :
public wxWindowWithItems<wxComboCtrl, wxItemContainer>
{
public:
// ctors and such
@@ -141,8 +142,6 @@ public:
virtual int GetSelection() const;
virtual wxString GetStringSelection() const;
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
// we have our own input handler and our own actions
// (but wxComboCtrl already handled Popup/Dismiss)
/*

View File

@@ -1422,6 +1422,15 @@ public:
virtual wxWindow *GetMainWindowOfCompositeControl()
{ return (wxWindow*)this; }
// If this function returns true, keyboard navigation events shouldn't
// escape from it. A typical example of such "navigation domain" is a top
// level window because pressing TAB in one of them must not transfer focus
// to a different top level window. But it's not limited to them, e.g. MDI
// children frames are not top level windows (and their IsTopLevel()
// returns false) but still are self-contained navigation domains as well.
virtual bool IsTopNavigationDomain() const { return false; }
protected:
// helper for the derived class Create() methods: the first overload, with
// validator parameter, should be used for child windows while the second

View File

@@ -467,7 +467,7 @@ WX_STRCMP_FUNC(wxStricmp, wxCRT_StricmpA, wxCRT_StricmpW, wxStricmp_String)
// forward-declare the template and implement it below WX_STRCMP_FUNC. OTOH,
// this fails to compile with VC6, so don't do it for VC. It also causes
// problems with GCC visibility in newer GCC versions.
#if !(defined(__VISUALC__) || wxCHECK_GCC_VERSION(3,5)) || defined(__clang__)
#if !(defined(__VISUALC__) || (wxCHECK_GCC_VERSION(3,5) && !wxCHECK_GCC_VERSION(4,7))) || defined(__clang__)
#define wxNEEDS_DECL_BEFORE_TEMPLATE
#endif