@see GetIcons()
*/
- const wxIcon GetIcon() const;
+ wxIcon GetIcon() const;
/**
Returns all icons associated with the window, there will be none of them
@see wxIconBundle
*/
- const wxIconBundle GetIcons() const;
+ const wxIconBundle& GetIcons() const;
/**
Gets a string containing the window title.
@see IsIconized(), Maximize(), wxIconizeEvent.
*/
- void Iconize(bool iconize);
+ virtual void Iconize(bool iconize = true);
/**
Returns @true if this window is currently active, i.e. if the user is
@see Iconize()
*/
- void Maximize(bool maximize);
+ virtual void Maximize(bool maximize = true);
/**
Use a system-dependent way to attract users attention to the window when
@see GetDefaultItem()
*/
- void SetDefaultItem(wxWindow* win);
+ wxWindow* SetDefaultItem(wxWindow* win);
/**
Sets the icon for this window.
fully transparent, and a value of 255 sets the window to be fully
opaque.
*/
- virtual bool SetTransparent(int alpha);
+ virtual bool SetTransparent(wxByte alpha);
/**
This virtual function is not meant to be called directly but can be
/**
Returns the item associated with this node.
*/
- const wxTreeItemId GetId();
+ const wxTreeItemId& GetId() const;
/**
Sets the item associated with this node.
/**
Indicates which type to associate an image with a wxTreeCtrl item.
-
+
@see wxTreeCtrl::GetItemImage(), wxTreeCtrl::SetItemImage()
*/
enum wxTreeItemIcon
@see Create(), wxValidator
*/
- wxTreeCtrl(wxWindow* parent, wxWindowID id,
+ wxTreeCtrl(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxTR_HAS_BUTTONS,
+ long style = wxTR_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "treeCtrl");
+ const wxString& name = wxTreeCtrlNameStr);
/**
virtual void CollapseAndReset(const wxTreeItemId& item);
/**
- Creates the tree control. See wxTreeCtrl::wxTreeCtrl() for further
- details.
+ Creates the tree control.
+ See wxTreeCtrl::wxTreeCtrl() for further details.
*/
- bool Create(wxWindow* parent, wxWindowID id,
+ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style = wxTR_HAS_BUTTONS,
+ long style = wxTR_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = "treeCtrl");
+ const wxString& name = wxTreeCtrlNameStr);
/**
Deletes the specified item. A EVT_TREE_DELETE_ITEM() event will be
@see EndEditLabel(), wxTreeEvent
*/
- void EditLabel(const wxTreeItemId& item);
+ virtual wxTextCtrl *EditLabel(const wxTreeItemId& item,
+ wxClassInfo* textCtrlClass = CLASSINFO(wxTextCtrl));
/**
Ends label editing. If @a cancelEdit is @true, the edit will be
@see EditLabel()
*/
- void EndEditLabel(bool cancelEdit);
+ virtual void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false);
/**
Scrolls and/or expands items to ensure that the given item is visible.
returns the total number of descendants, otherwise only one level of
children is counted.
*/
- unsigned int GetChildrenCount(const wxTreeItemId& item,
- bool recursively = true) const;
+ virtual size_t GetChildrenCount(const wxTreeItemId& item,
+ bool recursively = true) const;
/**
Returns the number of items in the control.
/**
Returns the current tree control indentation.
*/
- int GetIndent() const;
+ virtual unsigned int GetIndent() const;
/**
Returns the background colour of the item.
*/
virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
- /**
- Gets the selected item image (this function is obsolete, use @ref
- GetItemImage() "GetItemImage"( @a item, ::wxTreeItemIcon_Selected)
- instead).
- */
- int GetItemSelectedImage(const wxTreeItemId& item) const;
-
/**
Gets the specified item state.
*/
Python list of @ref wxTreeItemId "wxTreeItemId"s.
@endWxPythonOnly
*/
- unsigned int GetSelections(wxArrayTreeItemIds& selection) const;
+ virtual size_t GetSelections(wxArrayTreeItemIds& selection) const;
/**
Returns the state image list (from which application-defined state
/**
Sets the indentation for the tree control.
*/
- void SetIndent(int indent);
+ virtual void SetIndent(unsigned int indent);
/**
Sets the colour of the item's background.
virtual void SetItemImage(const wxTreeItemId& item, int image,
wxTreeItemIcon which = wxTreeItemIcon_Normal);
- /**
- Sets the selected item image (this function is obsolete, use @ref
- SetItemImage() "SetItemImage"( @a item, ::wxTreeItemIcon_Selected )
- instead).
- */
- void SetItemSelectedImage(const wxTreeItemId& item, int selImage);
-
/**
Sets the specified item state. The value of @a state may be:
- @c wxTREE_ITEMSTATE_NONE: to disable the item state (the state image will
/**
Constructor, used by wxWidgets itself only.
*/
- wxTreeEvent(wxEventType commandType, wxTreeCtrl* tree);
+ wxTreeEvent(wxEventType commandType, wxTreeCtrl* tree,
+ const wxTreeItemId& item = wxTreeItemId());
/**
Returns the item (valid for all events).
/**
Returns the key event for EVT_TREE_KEY_DOWN() events.
*/
- const wxKeyEvent GetKeyEvent() const;
+ const wxKeyEvent& GetKeyEvent() const;
/**
Returns the label if the event is a begin or end edit label event.
*/
- const wxString GetLabel() const;
+ const wxString& GetLabel() const;
/**
Returns the old item index (valid for EVT_TREE_ITEM_CHANGING() and
Creates an empty URI.
*/
wxURI();
+
/**
Constructor for quick creation.
@param uri
URI (Uniform Resource Identifier) to initialize with.
*/
- wxURI(const wxChar* uri);
+ wxURI(const wxString& uri);
+
/**
Copies this URI from another URI.
/**
Creates this URI from the @a uri string.
- Returns the position at which parsing stopped (there is no such thing
- as an "invalid" wxURI).
+ Returns @true if this instance was correctly initialized.
@param uri
String to initialize from.
*/
- const wxChar* Create(const wxString uri);
+ bool Create(const wxString& uri);
/**
Obtains the fragment of this URI.
/**
Obtains the host type of this URI, which is one of wxURIHostType.
*/
- const wxURIHostType& GetHostType() const;
+ wxURIHostType GetHostType() const;
/**
Returns the password part of the userinfo component of this URI. Note
@c "http://<user>:<password>@mysite.com/mypath"
*/
- const wxString& GetPassword() const;
+ wxString GetPassword() const;
/**
Returns the (normalized) path of the URI.
@c "http://<user>:<password>@mysite.com/mypath"
*/
- const wxString& GetUser() const;
+ wxString GetUser() const;
/**
Returns the UserInfo component of the URI.
@param uricomp
URI to compare to.
*/
- void operator ==(const wxURI& uricomp);
+ bool operator==(const wxURI& uricomp) const;
};
/**
Returns a reference to the protocol which will be used to get the URL.
*/
- wxProtocol GetProtocol();
+ wxProtocol& GetProtocol();
/**
Returns @true if this object is correctly initialized, i.e. if
as a squence of simple 8-bit charactesr and also different from
@c std::wstring which stores the string differently depending on
the definition of wchar_t.
-
+
The main purpose of wxUString is a to give users a Unicode string
- class that has O(1) access to its content, to be identical on all
+ class that has O(1) access to its content, to be identical on all
platforms and to be easily convertable to wxString as well as other
ways to store strings (C string literals, wide character
string literals, character buffer, etc) by providing several overloads
and built-in conversions to and from the various string formats.
-
+
wxUString derives from @c std::basic_string<wxChar32> and therefore
offers the complete API of @c std::string.
-
+
@library{wxbase}
@category{data}
-
+
@see wxString, @ref overview_string "wxString overview", @ref overview_unicode
"Unicode overview"
*/
class WXDLLIMPEXP_BASE wxUString: public std::basic_string<wxChar32>
{
-public:
+public:
/**
Default constructor.
*/
/**
Constructs a string from a 32-bit string literal.
*/
- wxUString( const wxChar32 *str );
+ wxUString( const wxChar32 *str );
/**
Constructs a string from 32-bit string buffer.
*/
- wxUString( const wxU32CharBuffer &buf );
+ wxUString( const wxU32CharBuffer &buf );
/**
Constructs a string from C string literal using wxConvLibc to convert it to Unicode.
*/
/**
Constructs a string from @a n characters @a ch.
*/
- wxUString( size_type n, char ch );
+ wxUString( size_t n, char ch );
/**
Constructs a string from @a n characters @a ch.
*/
- wxUString( size_type n, wxChar16 ch );
+ wxUString( size_t n, wxChar16 ch );
/**
Constructs a string from @a n characters @a ch.
*/
- wxUString( size_type n, wxChar32 ch );
+ wxUString( size_t n, wxChar32 ch );
/**
Constructs a string from @a n characters @a ch.
*/
- wxUString( size_type n, wxUniChar ch );
+ wxUString( size_t n, wxUniChar ch );
/**
Constructs a string from @a n characters @a ch.
*/
- wxUString( size_type n, wxUniCharRef ch );
-
+ wxUString( size_t n, wxUniCharRef ch );
+
/**
Static construction of a wxUString from a 7-bit ASCII string
*/
- static wxUString FromAscii( const char *str, size_type n );
+ static wxUString FromAscii( const char *str, size_t n );
/**
Static construction of a wxUString from a 7-bit ASCII string
*/
/**
Static construction of a wxUString from a UTF-8 encoded string
*/
- static wxUString FromUTF8( const char *str, size_type n );
+ static wxUString FromUTF8( const char *str, size_t n );
/**
Static construction of a wxUString from a UTF-8 encoded string
*/
/**
Static construction of a wxUString from a UTF-16 encoded string
*/
- static wxUString FromUTF16( const wxChar16 *str, size_type n );
+ static wxUString FromUTF16( const wxChar16 *str, size_t n );
/**
Static construction of a wxUString from a UTF-16 encoded string
*/
static wxUString FromUTF16( const wxChar16 *str );
-
+
/**
Assigment from a 7-bit ASCII string literal
- */
+ */
wxUString &assignFromAscii( const char *str );
/**
Assigment from a 7-bit ASCII string literal
- */
- wxUString &assignFromAscii( const char *str, size_type n );
+ */
+ wxUString &assignFromAscii( const char *str, size_t n );
/**
Assigment from a UTF-8 string literal
- */
+ */
wxUString &assignFromUTF8( const char *str );
/**
Assigment from a UTF-8 string literal
- */
- wxUString &assignFromUTF8( const char *str, size_type n );
+ */
+ wxUString &assignFromUTF8( const char *str, size_t n );
/**
Assigment from a UTF-16 string literal
- */
+ */
wxUString &assignFromUTF16( const wxChar16* str );
/**
Assigment from a UTF-16 string literal
- */
- wxUString &assignFromUTF16( const wxChar16* str, size_type n );
+ */
+ wxUString &assignFromUTF16( const wxChar16* str, size_t n );
/**
Assigment from a C string literal using wxConvLibc
- */
+ */
wxUString &assignFromCString( const char* str );
/**
Assigment from a C string literal using @a conv
- */
+ */
wxUString &assignFromCString( const char* str, const wxMBConv &conv );
-
+
/**
Conversion to a UTF-8 string
*/
Conversion to a UTF-16 string
*/
wxU16CharBuffer utf16_str() const;
-
+
/**
Conversion to a wide character string (either UTF-16
or UCS-4, depending on the size of wchar_t).
single and repeated characters etc.
*/
wxUString &assign( const wxUString &str );
-
+
/**
Appending. wxUString additionally provides overloads for
wxString, C string, UTF-16 strings, 32-bit strings, char buffers,
single and repeated characters etc.
*/
wxUString &append( const wxUString &s );
-
+
/**
Insertion. wxUString additionally provides overloads for
wxString, C string, UTF-16 strings, 32-bit strings, char buffers,
single characters etc.
*/
- wxUString &insert( size_type pos, const wxUString &s );
+ wxUString &insert( size_t pos, const wxUString &s );
/**
Assignment operator. wxUString additionally provides overloads for
single characters etc.
*/
inline wxUString& operator=(const wxUString& s);
-
+
/**
Concatenation operator. wxUString additionally provides overloads for
wxString, C string, UTF-16 strings, 32-bit strings, char buffers,
single characters etc.
*/
inline wxUString& operator+=(const wxUString& s);
-
+
};
/**
/**
Constructs a variant from a wxDateTime.
*/
- wxVariant(wxDateTime& val, const wxString& name = wxEmptyString);
+ wxVariant(const wxDateTime& val, const wxString& name = wxEmptyString);
/**
Constructs a variant from a wxArrayString.
*/
- wxVariant(wxArrayString& val, const wxString& name = wxEmptyString);
+ wxVariant(const wxArrayString& val, const wxString& name = wxEmptyString);
/**
Destructor.
/**
Returns the character value.
*/
- wxChar GetChar() const;
+ wxUniChar GetChar() const;
/**
Returns a pointer to the internal variant data. To take ownership of
/**
Returns a constant reference to the variant name.
*/
- const wxString GetName() const;
+ const wxString& GetName() const;
/**
Gets the string value.
/**
Reads the data from @a stream.
*/
- bool Read(ostream& stream);
+ virtual bool Read(istream& stream);
+
/**
Reads the data from @a string.
*/
*/
wxAccessible* GetAccessible();
- /**
- @deprecated
- This method is deprecated, use GetEffectiveMinSize() instead.
- */
- wxSize GetAdjustedBestSize() const;
-
/**
Returns the background colour of the window.
*/
wxXmlResource(const wxString& filemask,
int flags = wxXRC_USE_LOCALE,
- const wxString domain = wxEmptyString);
+ const wxString& domain = wxEmptyString);
/**
Constructor.
This provides a way to allow the strings to only come from a specific catalog.
*/
wxXmlResource(int flags = wxXRC_USE_LOCALE,
- const wxString domain = wxEmptyString);
+ const wxString& domain = wxEmptyString);
/**
Destructor.