git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56730
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
19 files changed:
@param size
size of the new buffer.
*/
@param size
size of the new buffer.
*/
- wxMemoryBuffer(size_t size);
+ wxMemoryBuffer(size_t size = DefBufSize);
/**
Append a single byte to the buffer.
/**
Append a single byte to the buffer.
does have it, this pointer may be used to directly manipulate the alpha values
which are stored as the RGB ones.
*/
does have it, this pointer may be used to directly manipulate the alpha values
which are stored as the RGB ones.
*/
- const unsigned char * GetAlpha() const;
+ unsigned char* GetAlpha() const;
/**
Returns the blue intensity at the given coordinate.
/**
Returns the blue intensity at the given coordinate.
- bool LoadFile(wxInputStream& stream, wxBitmapType type, int index = -1);
+ virtual bool LoadFile(wxInputStream& stream,
+ wxBitmapType type = wxBITMAP_TYPE_ANY,
+ int index = -1);
/**
Loads an image from a file.
/**
Loads an image from a file.
*/
void SetAlpha(int x, int y, unsigned char alpha);
*/
void SetAlpha(int x, int y, unsigned char alpha);
/**
Sets the image data without performing checks.
/**
Sets the image data without performing checks.
that will be responsible for deleting it.
Do not pass to this function a pointer obtained through GetData().
*/
that will be responsible for deleting it.
Do not pass to this function a pointer obtained through GetData().
*/
- void SetData(unsigned char* data);
+ void SetData(unsigned char* data, bool static_data = false);
+ void SetData(unsigned char* data, int new_width, int new_height,
+ bool static_data = false);
+ //@}
/**
Specifies whether there is a mask or not.
/**
Specifies whether there is a mask or not.
This routine performs bounds-checks for the coordinate so it can be considered
a safe way to manipulate the data.
*/
This routine performs bounds-checks for the coordinate so it can be considered
a safe way to manipulate the data.
*/
- void SetRGB(wxRect& rect, unsigned char red,
+ void SetRGB(const wxRect& rect,
+ unsigned char red,
unsigned char green,
unsigned char blue);
unsigned char green,
unsigned char blue);
bitmap will automatically be split into smaller images, each
matching the dimensions of the image list.
This does not apply when adding icons.
bitmap will automatically be split into smaller images, each
matching the dimensions of the image list.
This does not apply when adding icons.
+
+ @onlyfor{wxmsw,wxmac}
*/
int Add(const wxIcon& icon);
*/
int Add(const wxIcon& icon);
@remarks The original bitmap or icon is not affected by the Replace()
operation, and can be deleted afterwards.
@remarks The original bitmap or icon is not affected by the Replace()
operation, and can be deleted afterwards.
+
+ @onlyfor{wxmsw,wxmac}
*/
bool Replace(int index, const wxIcon& icon);
};
*/
bool Replace(int index, const wxIcon& icon);
};
@param id
The button id to report, from 0 to GetNumberButtons() - 1
*/
@param id
The button id to report, from 0 to GetNumberButtons() - 1
*/
- bool GetButtonState(unsigned id) const;
+ bool GetButtonState(unsigned int id) const;
/**
Returns the manufacturer id.
/**
Returns the manufacturer id.
@param axis
The joystick axis to report, from 0 to GetNumberAxes() - 1.
*/
@param axis
The joystick axis to report, from 0 to GetNumberAxes() - 1.
*/
- int GetPosition(unsigned axis) const;
+ int GetPosition(unsigned int axis) const;
/**
Returns the product id for the joystick.
/**
Returns the product id for the joystick.
By default, no modifiers are active.
*/
By default, no modifiers are active.
*/
- wxKeyboardState(bool controlDown,
- bool shiftDown,
- bool altDown,
- bool metaDown);
+ wxKeyboardState(bool controlDown = false,
+ bool shiftDown = false,
+ bool altDown = false,
+ bool metaDown = false);
/**
Return the bit mask of all pressed modifier keys.
/**
Return the bit mask of all pressed modifier keys.
The return value is a combination of @c wxMOD_ALT, @c wxMOD_CONTROL,
@c wxMOD_SHIFT and @c wxMOD_META bit masks. Additionally, @c wxMOD_NONE
is defined as 0, i.e. corresponds to no modifiers (see HasModifiers())
The return value is a combination of @c wxMOD_ALT, @c wxMOD_CONTROL,
@c wxMOD_SHIFT and @c wxMOD_META bit masks. Additionally, @c wxMOD_NONE
is defined as 0, i.e. corresponds to no modifiers (see HasModifiers())
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
- const wxString& name = wxEmptyStr);
+ const wxString& name = wxEmptyString);
/**
Returns the wxListView associated with the control.
/**
Returns the wxListView associated with the control.
Position before which to insert the items: if pos is 0 the
items will be inserted in the beginning of the listbox
*/
Position before which to insert the items: if pos is 0 the
items will be inserted in the beginning of the listbox
*/
- void InsertItems(int nItems, const wxString *items,
+ void InsertItems(unsigned int nItems, const wxString *items,
@param clientData
Options array of client data pointers
*/
@param clientData
Options array of client data pointers
*/
- void Set(int n, const wxString* choices, void **clientData = NULL);
+ void Set(unsigned int n, const wxString* choices, void *clientData);
/**
Clears the list box and adds the given strings to it.
/**
Clears the list box and adds the given strings to it.
@param clientData
Options array of client data pointers
*/
@param clientData
Options array of client data pointers
*/
- void Set(const wxArrayString& choices, void **clientData = NULL);
+ void Set(const wxArrayString& choices, void *clientData);
/**
Set the specified item to be the first visible item.
/**
Set the specified item to be the first visible item.
Find an item whose data matches this data, starting from start or the
beginning if 'start' is @c -1.
*/
Find an item whose data matches this data, starting from start or the
beginning if 'start' is @c -1.
*/
- long FindItem(long start, long data);
+ long FindItem(long start, wxUIntPtr data);
/**
Find an item nearest this position in the specified direction,
/**
Find an item nearest this position in the specified direction,
- wxListEvent(wxEventType commandType = 0, int id = 0);
+ wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
/**
For @c EVT_LIST_CACHE_HINT event only: return the first item which the
/**
For @c EVT_LIST_CACHE_HINT event only: return the first item which the
Construct a wxListItemAttr with the specified foreground and
background colors and font.
*/
Construct a wxListItemAttr with the specified foreground and
background colors and font.
*/
- wxListItemAttr(const wxColour colText,
- const wxColour colBack,
- const wxFont font);
+ wxListItemAttr(const wxColour& colText,
+ const wxColour& colBack,
+ const wxFont& font);
/**
Returns the currently set background color.
/**
Returns the currently set background color.
Constructs a log target which sends all the log messages to the given
output stream. If it is @NULL, the messages are sent to @c cerr.
*/
Constructs a log target which sends all the log messages to the given
output stream. If it is @NULL, the messages are sent to @c cerr.
*/
- wxLogStream(std::ostream ostr = NULL);
+ wxLogStream(std::ostream *ostr = NULL);
@param name
Window name.
*/
@param name
Window name.
*/
- wxMediaCtrl(wxWindow* parent, wxWindowID id, const wxString& fileName = wxT(""),
+ wxMediaCtrl(wxWindow* parent, wxWindowID id, const wxString& fileName = wxEmptyString,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long style = 0, const wxString& szBackend = wxT(""),
+ long style = 0, const wxString& szBackend = wxEmptyString,
const wxValidator& validator = wxDefaultValidator,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxPanelNameStr);
+ const wxString& name = "mediaCtrl");
/**
Creates this control.
/**
Creates this control.
@param name
Window name.
*/
@param name
Window name.
*/
- bool Create(wxWindow* parent, wxWindowID id, const wxString& fileName = wxT(""),
+ bool Create(wxWindow* parent, wxWindowID id, const wxString& fileName = wxEmptyString,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long style = 0, const wxString& szBackend = wxT(""),
+ long style = 0, const wxString& szBackend = wxEmptyString,
const wxValidator& validator = wxDefaultValidator,
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxPanelNameStr);
+ const wxString& name = "mediaCtrl");
/**
Obtains the best size relative to the original/natural size of the
/**
Obtains the best size relative to the original/natural size of the
@remarks Only use this when the menu bar has been associated with a
frame; otherwise, use the wxMenu equivalent call.
*/
@remarks Only use this when the menu bar has been associated with a
frame; otherwise, use the wxMenu equivalent call.
*/
- void Enable(int id, const bool enable);
+ void Enable(int id, bool enable);
/**
Enables or disables a whole menu.
/**
Enables or disables a whole menu.
@param style
If set to wxMENU_TEAROFF, the menu will be detachable (wxGTK only).
*/
@param style
If set to wxMENU_TEAROFF, the menu will be detachable (wxGTK only).
*/
- wxMenu(const wxString& title = "", long style = 0);
+ wxMenu(const wxString& title, long style = 0);
/**
Destructor, destroying the menu.
/**
Destructor, destroying the menu.
@see FindItem(), Destroy(), Remove()
*/
@see FindItem(), Destroy(), Remove()
*/
/**
Deletes the menu item from the menu. If the item is a submenu, it will
/**
Deletes the menu item from the menu. If the item is a submenu, it will
@see FindItem(), Destroy(), Remove()
*/
@see FindItem(), Destroy(), Remove()
*/
- void Delete(wxMenuItem* item);
+ bool Delete(wxMenuItem* item);
/**
Deletes the menu item from the menu. If the item is a submenu, it will
/**
Deletes the menu item from the menu. If the item is a submenu, it will
@see FindItem(), Deletes(), Remove()
*/
@see FindItem(), Deletes(), Remove()
*/
/**
Deletes the menu item from the menu. If the item is a submenu, it will
/**
Deletes the menu item from the menu. If the item is a submenu, it will
@see FindItem(), Deletes(), Remove()
*/
@see FindItem(), Deletes(), Remove()
*/
- void Destroy(wxMenuItem* item);
+ bool Destroy(wxMenuItem* item);
/**
Enables or disables (greys out) a menu item.
/**
Enables or disables (greys out) a menu item.
@return Menu item object or NULL if none is found.
*/
@return Menu item object or NULL if none is found.
*/
- const wxMenuItem* FindItem(int id, wxMenu** menu = NULL) const;
+ wxMenuItem* FindItem(int id, wxMenu** menu = NULL) const;
/**
Returns the wxMenuItem given a position in the menu.
/**
Returns the wxMenuItem given a position in the menu.
*/
size_t GetMenuItemCount() const;
*/
size_t GetMenuItemCount() const;
/**
Returns the list of items in the menu.
wxMenuItemList is a pseudo-template list class containing wxMenuItem
pointers, see wxList.
*/
/**
Returns the list of items in the menu.
wxMenuItemList is a pseudo-template list class containing wxMenuItem
pointers, see wxList.
*/
- wxMenuItemList GetMenuItems() const;
+ wxMenuItemList& GetMenuItems() const;
+ const wxMenuItemList& GetMenuItems() const;
+ //@}
/**
Returns the title of the menu.
/**
Returns the title of the menu.
@see Append(), Prepend()
*/
wxMenuItem* Insert(size_t pos, int id,
@see Append(), Prepend()
*/
wxMenuItem* Insert(size_t pos, int id,
- const wxString& item = "",
- const wxString& helpString = "",
+ const wxString& item = wxEmptyString,
+ const wxString& helpString = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL);
/**
wxItemKind kind = wxITEM_NORMAL);
/**
@see Append(), Insert()
*/
@see Append(), Insert()
*/
- wxMenuItem* Prepend(int id, const wxString& item = "",
- const wxString& helpString = "",
+ wxMenuItem* Prepend(int id, const wxString& item = wxEmptyString,
+ const wxString& helpString = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL);
/**
wxItemKind kind = wxITEM_NORMAL);
/**
If non-@NULL, indicates that the menu item is a submenu.
*/
wxMenuItem(wxMenu* parentMenu = NULL, int id = wxID_SEPARATOR,
If non-@NULL, indicates that the menu item is a submenu.
*/
wxMenuItem(wxMenu* parentMenu = NULL, int id = wxID_SEPARATOR,
- const wxString& text = "",
- const wxString& helpString = "",
+ const wxString& text = wxEmptyString,
+ const wxString& helpString = wxEmptyString,
wxItemKind kind = wxITEM_NORMAL,
wxMenu* subMenu = NULL);
wxItemKind kind = wxITEM_NORMAL,
wxMenu* subMenu = NULL);
Dialog position (ignored under MSW).
*/
wxMessageDialog(wxWindow* parent, const wxString& message,
Dialog position (ignored under MSW).
*/
wxMessageDialog(wxWindow* parent, const wxString& message,
- const wxString& caption = "Message box",
+ const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK | wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
long style = wxOK | wxCENTRE,
const wxPoint& pos = wxDefaultPosition);
buffer data of length len. The stream does not take ownership of the buffer,
i.e. the buffer will not be deleted in its destructor.
*/
buffer data of length len. The stream does not take ownership of the buffer,
i.e. the buffer will not be deleted in its destructor.
*/
- wxMemoryInputStream(const char* data, size_t len);
+ wxMemoryInputStream(const void* data, size_t len);
/**
Creates a new read-only memory stream, initializing it with the data from
/**
Creates a new read-only memory stream, initializing it with the data from
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTAB_TRAVERSAL,
- const wxString& name = "panel");
+ const wxString& name = wxPanelNameStr);
/**
Destructor. Deletes any child windows before deleting the physical window.
/**
Destructor. Deletes any child windows before deleting the physical window.
@param stipple
A stipple bitmap.
@param stipple
A stipple bitmap.
+ @onlyfor{wxmsw,wxmac}
+
@see SetWidth(), SetStipple()
*/
wxPen(const wxBitmap& stipple, int width);
@see SetWidth(), SetStipple()
*/
wxPen(const wxBitmap& stipple, int width);
@return @true on success, @false if something goes wrong (invalid @a service).
*/
@return @true on success, @false if something goes wrong (invalid @a service).
*/
- bool Service(unsigned short service);
+ bool Service(unsigned short service) = 0;
/**
Returns the current service.
*/
/**
Returns the current service.
*/
- unsigned short Service();
+ unsigned short Service() const = 0;
/**
Returns the current service.
*/
/**
Returns the current service.
*/
- virtual unsigned short Service();
+ virtual unsigned short Service() const;
compatibility concerns).
*/
const wxWCharBuffer cMB2WC(const char* in,
compatibility concerns).
*/
const wxWCharBuffer cMB2WC(const char* in,
- size_t inLen = wxNO_LEN,
- size_t *outLen = NULL) const;
+ size_t inLen,
+ size_t *outLen) const;
FromWChar(), please see the description of cMB2WC() for more details.
*/
const wxCharBuffer cWC2MB(const wchar_t* in,
FromWChar(), please see the description of cMB2WC() for more details.
*/
const wxCharBuffer cWC2MB(const wchar_t* in,
- size_t inLen = wxNO_LEN,
- size_t *outLen = NULL) const;
+ size_t inLen,
+ size_t *outLen) const;
This function returns a reference on the current object, so the user can
test any states of the stream right away.
*/
This function returns a reference on the current object, so the user can
test any states of the stream right away.
*/
- wxOutputStream Write(const void* buffer, size_t size);
+ wxOutputStream& Write(const void* buffer, size_t size);
/**
Reads data from the specified input stream and stores them
in the current stream. The data is read until an error is raised
by one of the two streams.
*/
/**
Reads data from the specified input stream and stores them
in the current stream. The data is read until an error is raised
by one of the two streams.
*/
- wxOutputStream Write(wxInputStream& stream_in);
+ wxOutputStream& Write(wxInputStream& stream_in);
@return This function returns a reference on the current object, so the
user can test any states of the stream right away.
*/
@return This function returns a reference on the current object, so the
user can test any states of the stream right away.
*/
- wxInputStream Read(void* buffer, size_t size);
+ virtual wxInputStream& Read(void* buffer, size_t size);
/**
Reads data from the input queue and stores it in the specified output stream.
/**
Reads data from the input queue and stores it in the specified output stream.
@return Returns the amount of bytes saved in the Write-Back buffer.
*/
@return Returns the amount of bytes saved in the Write-Back buffer.
*/
- size_t Ungetch(const char* buffer, size_t size);
+ size_t Ungetch(const void* buffer, size_t size);
/**
This function acts like the previous one except that it takes only one
character: it is sometimes shorter to use than the generic function.
*/
/**
This function acts like the previous one except that it takes only one
character: it is sometimes shorter to use than the generic function.
*/
- Return value bool Ungetch(char c);