fixes for missing or broken interface items for Phoenix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-09-16 17:03:01 +00:00
parent e23e368bc4
commit e932127792
11 changed files with 177 additions and 4 deletions

View File

@@ -109,6 +109,25 @@ public:
const wxString& name = "listBox"); const wxString& name = "listBox");
//@} //@}
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int nStrings = 0,
const wxString choices[] = NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
/** /**
Destructor, destroying the list box. Destructor, destroying the list box.
*/ */
@@ -132,5 +151,6 @@ public:
Index of item whose check status is to be returned. Index of item whose check status is to be returned.
*/ */
bool IsChecked(unsigned int item) const; bool IsChecked(unsigned int item) const;
}; };

View File

@@ -305,5 +305,16 @@ public:
@since 2.9.1 @since 2.9.1
*/ */
virtual void Dismiss(); virtual void Dismiss();
virtual int GetSelection() const;
virtual void GetSelection(long *from, long *to) const;
virtual void SetSelection(int n);
virtual void SetSelection(long from, long to);
virtual int FindString(const wxString& s, bool bCase = false) const;
virtual wxString GetString(unsigned int n) const;
virtual wxString GetStringSelection() const;
virtual void SetString(unsigned int n, const wxString& s);
virtual unsigned int GetCount() const;
}; };

View File

@@ -631,6 +631,36 @@ public:
}; };
// ----------------------------------------------------------------------------
// wxDataViewCtrl flags
// ----------------------------------------------------------------------------
// size of a wxDataViewRenderer without contents:
#define wxDVC_DEFAULT_RENDERER_SIZE 20
// the default width of new (text) columns:
#define wxDVC_DEFAULT_WIDTH 80
// the default width of new toggle columns:
#define wxDVC_TOGGLE_DEFAULT_WIDTH 30
// the default minimal width of the columns:
#define wxDVC_DEFAULT_MINWIDTH 30
// The default alignment of wxDataViewRenderers is to take
// the alignment from the column it owns.
#define wxDVR_DEFAULT_ALIGNMENT -1
#define wxDV_SINGLE 0x0000 // for convenience
#define wxDV_MULTIPLE 0x0001 // can select multiple items
#define wxDV_NO_HEADER 0x0002 // column titles not visible
#define wxDV_HORIZ_RULES 0x0004 // light horizontal rules between rows
#define wxDV_VERT_RULES 0x0008 // light vertical rules between columns
#define wxDV_ROW_LINES 0x0010 // alternating colour in rows
#define wxDV_VARIABLE_LINE_HEIGHT 0x0020 // variable line height
/** /**
@class wxDataViewCtrl @class wxDataViewCtrl

View File

@@ -469,6 +469,10 @@ enum wxBorder
(wxICON_EXCLAMATION|wxICON_HAND|wxICON_QUESTION|wxICON_INFORMATION|wxICON_NONE) (wxICON_EXCLAMATION|wxICON_HAND|wxICON_QUESTION|wxICON_INFORMATION|wxICON_NONE)
/* symbolic constant used by all Find()-like functions returning positive */
/* integer on success as failure indicator */
#define wxNOT_FOUND (-1)
/** /**
Background styles. Background styles.
@@ -517,7 +521,14 @@ enum wxBackgroundStyle
EVT_ERASE_BACKGROUND event will not be generated at all for windows EVT_ERASE_BACKGROUND event will not be generated at all for windows
with this style. with this style.
*/ */
wxBG_STYLE_PAINT wxBG_STYLE_PAINT,
/* this style is deprecated and doesn't do anything, don't use */
wxBG_STYLE_COLOUR,
/* this is a Mac-only style, don't use in portable code */
wxBG_STYLE_TRANSPARENT,
}; };

View File

@@ -27,6 +27,16 @@
class wxFileConfig : public wxConfigBase class wxFileConfig : public wxConfigBase
{ {
public: public:
// New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or
// wxCONFIG_USE_GLOBAL_FILE to say which files should be used.
wxFileConfig(const wxString& appName = wxEmptyString,
const wxString& vendorName = wxEmptyString,
const wxString& localFilename = wxEmptyString,
const wxString& globalFilename = wxEmptyString,
long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE,
const wxMBConv& conv = wxConvAuto());
/** /**
Read the config data from the specified stream instead of the associated file, Read the config data from the specified stream instead of the associated file,
as usual. as usual.
@@ -57,6 +67,9 @@ public:
*/ */
static wxFileName GetLocalFile(const wxString& basename, int style = 0); static wxFileName GetLocalFile(const wxString& basename, int style = 0);
static wxString GetGlobalFileName(const wxString& szFile);
static wxString GetLocalFileName(const wxString& szFile, int style = 0);
/** /**
Saves all config data to the given stream, returns @true if data was saved Saves all config data to the given stream, returns @true if data was saved
successfully or @false on error. successfully or @false on error.
@@ -81,5 +94,29 @@ public:
@see wxCHANGE_UMASK() @see wxCHANGE_UMASK()
*/ */
void SetUmask(int mode); void SetUmask(int mode);
// implement inherited pure virtual functions
virtual void SetPath(const wxString& strPath);
virtual const wxString& GetPath() const;
virtual bool GetFirstGroup(wxString& str, long& lIndex) const;
virtual bool GetNextGroup (wxString& str, long& lIndex) const;
virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
virtual bool GetNextEntry (wxString& str, long& lIndex) const;
virtual size_t GetNumberOfEntries(bool bRecursive = false) const;
virtual size_t GetNumberOfGroups(bool bRecursive = false) const;
virtual bool HasGroup(const wxString& strName) const;
virtual bool HasEntry(const wxString& strName) const;
virtual bool Flush(bool bCurrentOnly = false);
virtual bool RenameEntry(const wxString& oldName, const wxString& newName);
virtual bool RenameGroup(const wxString& oldName, const wxString& newName);
virtual bool DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso = true);
virtual bool DeleteGroup(const wxString& szKey);
virtual bool DeleteAll();
}; };

View File

@@ -6,6 +6,17 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
enum
{
wxFD_OPEN = 0x0001,
wxFD_SAVE = 0x0002,
wxFD_OVERWRITE_PROMPT = 0x0004,
wxFD_FILE_MUST_EXIST = 0x0010,
wxFD_MULTIPLE = 0x0020,
wxFD_CHANGE_DIR = 0x0080,
wxFD_PREVIEW = 0x0100
};
/** /**
@class wxFileDialog @class wxFileDialog

View File

@@ -36,9 +36,10 @@ enum wxFontFamily
/// See also wxFont::IsFixedWidth() for an easy way to test for monospace property. /// See also wxFont::IsFixedWidth() for an easy way to test for monospace property.
wxFONTFAMILY_TELETYPE = wxTELETYPE, wxFONTFAMILY_TELETYPE = wxTELETYPE,
wxFONTFAMILY_MAX,
/// Invalid font family value, returned by wxFont::GetFamily() when the /// Invalid font family value, returned by wxFont::GetFamily() when the
/// font is invalid for example. /// font is invalid for example.
wxFONTFAMILY_UNKNOWN wxFONTFAMILY_UNKNOWN = wxFONTFAMILY_MAX
}; };
/** /**

View File

@@ -6,6 +6,17 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------
// wxGauge style flags
// ----------------------------------------------------------------------------
#define wxGA_HORIZONTAL wxHORIZONTAL
#define wxGA_VERTICAL wxVERTICAL
// Win32 only, is default (and only) on some other platforms
#define wxGA_SMOOTH 0x0020
/** /**
@class wxGauge @class wxGauge

View File

@@ -166,6 +166,13 @@ public:
*/ */
void Deselect(int n); void Deselect(int n);
virtual void SetSelection(int n);
virtual int GetSelection() const;
virtual bool SetStringSelection(const wxString& s, bool select);
virtual bool SetStringSelection(const wxString& s);
/** /**
Fill an array of ints with the positions of the currently selected items. Fill an array of ints with the positions of the currently selected items.
@@ -291,5 +298,17 @@ public:
The string that should be visible. The string that should be visible.
*/ */
void SetFirstItem(const wxString& string); void SetFirstItem(const wxString& string);
virtual void EnsureVisible(int n);
virtual bool IsSorted() const;
// implement base class pure virtuals
virtual void Refresh(bool eraseBack = true, const wxRect *rect = NULL);
virtual unsigned int GetCount() const;
virtual wxString GetString(unsigned int n) const;
virtual void SetString(unsigned int n, const wxString& s);
virtual int FindString(const wxString& s, bool bCase = false) const;
}; };

View File

@@ -373,6 +373,28 @@ public:
@remarks Use only after the menubar has been associated with a frame. @remarks Use only after the menubar has been associated with a frame.
*/ */
virtual void SetMenuLabel(size_t pos, const wxString& label); virtual void SetMenuLabel(size_t pos, const wxString& label);
/**
Enables you to set the global menubar on Mac, that is, the menubar displayed
when the app is running without any frames open.
@param menubar
The menubar to set.
@remarks Only exists on Mac, other platforms do not have this method.
*/
static void MacSetCommonMenuBar(wxMenuBar* menubar);
/**
Enables you to get the global menubar on Mac, that is, the menubar displayed
when the app is running without any frames open.
@return The global menubar.
@remarks Only exists on Mac, other platforms do not have this method.
*/
static wxMenuBar* MacGetCommonMenuBar();
}; };
@@ -799,7 +821,7 @@ public:
@see Append(), Prepend() @see Append(), Prepend()
*/ */
wxMenuItem* Insert(size_t pos, wxMenuItem* item); wxMenuItem* Insert(size_t pos, wxMenuItem* menuItem);
/** /**
Inserts the given @a item before the position @a pos. Inserts the given @a item before the position @a pos.

View File

@@ -442,7 +442,7 @@ public:
@since 2.9.0 @since 2.9.0
*/ */
virtual void SetHint(const wxString& hint); virtual bool SetHint(const wxString& hint);
/** /**
Returns the current hint string. Returns the current hint string.