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.
*/
Index of item whose check status is to be returned.
*/
bool IsChecked(unsigned int item) const;
+
};
@since 2.9.1
*/
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;
};
};
+// ----------------------------------------------------------------------------
+// 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
(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.
EVT_ERASE_BACKGROUND event will not be generated at all for windows
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,
+
};
class wxFileConfig : public wxConfigBase
{
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,
as usual.
*/
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
successfully or @false on error.
@see wxCHANGE_UMASK()
*/
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();
};
// 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
/// See also wxFont::IsFixedWidth() for an easy way to test for monospace property.
wxFONTFAMILY_TELETYPE = wxTELETYPE,
+ wxFONTFAMILY_MAX,
/// Invalid font family value, returned by wxFont::GetFamily() when the
/// font is invalid for example.
- wxFONTFAMILY_UNKNOWN
+ wxFONTFAMILY_UNKNOWN = wxFONTFAMILY_MAX
};
/**
// 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
*/
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.
The string that should be visible.
*/
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;
};
@remarks Use only after the menubar has been associated with a frame.
*/
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();
+
};
@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.
@since 2.9.0
*/
- virtual void SetHint(const wxString& hint);
+ virtual bool SetHint(const wxString& hint);
/**
Returns the current hint string.