@onlyfor{wxosx}
*/
- wxDEPRECATED_BUT_USED_INTERNALLY(
- virtual void MacOpenFile(const wxString& fileName)
- );
+ virtual void MacOpenFile(const wxString& fileName);
/**
Called in response of a "get-url" Apple event.
@see @ref overview_bookctrl
*/
-class wxBookCtrlBase : public wxControl
+class wxBookCtrlBase : public wxControl, public wxWithImages
{
public:
enum
*/
//@{
- /**
- Sets the image list for the page control and takes ownership of the list.
-
- @see wxImageList, SetImageList()
- */
- void AssignImageList(wxImageList* imageList);
-
- /**
- Returns the associated image list.
-
- @see wxImageList, SetImageList()
- */
- wxImageList* GetImageList() const;
/**
Returns the image index for the given page.
*/
virtual int GetPageImage(size_t nPage) const = 0;
- /**
- Sets the image list for the page control.
- It does not take ownership of the image list, you must delete it yourself.
-
- @see wxImageList, AssignImageList()
- */
- virtual void SetImageList(wxImageList* imageList);
-
/**
Sets the image index for the given page. @a image is an index into
the image list which was set with SetImageList().
class wxControl : public wxWindow
{
public:
+
+ /**
+ Constructs a control.
+
+ @param parent
+ Pointer to a parent window.
+ @param id
+ Control identifier. If wxID_ANY, will automatically create an identifier.
+ @param pos
+ Control position. wxDefaultPosition indicates that wxWidgets
+ should generate a default position for the control.
+ @param size
+ Control size. wxDefaultSize indicates that wxWidgets should generate
+ a default size for the window. If no suitable size can be found, the
+ window will be sized to 20x20 pixels so that the window is visible but
+ obviously not correctly sized.
+ @param style
+ Control style. For generic window styles, please see wxWindow.
+ @param name
+ Control name.
+ */
+ wxControl(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxControlNameStr);
+
+ bool Create(wxWindow *parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxControlNameStr);
+
/**
Simulates the effect of the user issuing a command to the item.
@since 2.9.1
*/
- void LogRecord(wxLogLevel level, const wxString& msg, time_t timestamp);
+ void LogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info);
protected:
/**
context it returns a 2-element list (item, submenu).
@endWxPerlOnly
*/
- virtual wxMenuItem* FindItem(int id, wxMenu* menu = NULL) const;
+ virtual wxMenuItem* FindItem(int id, wxMenu** menu = NULL) const;
/**
Returns the index of the menu with the given @a title or @c wxNOT_FOUND if no
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#define wxPD_CAN_ABORT 0x0001
+#define wxPD_APP_MODAL 0x0002
+#define wxPD_AUTO_HIDE 0x0004
+#define wxPD_ELAPSED_TIME 0x0008
+#define wxPD_ESTIMATED_TIME 0x0010
+#define wxPD_SMOOTH 0x0020
+#define wxPD_REMAINING_TIME 0x0040
+#define wxPD_CAN_SKIP 0x0080
+
/**
@class wxProgressDialog
*/
void SetSpacer(const wxSize& size);
+ void SetUserData(wxObject* userData);
+
/**
Set the window to be tracked by this item.
@deprecated @todo provide deprecation description
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#define wxST_NO_AUTORESIZE 0x0001
+#define wxST_ELLIPSIZE_START 0x0004
+#define wxST_ELLIPSIZE_MIDDLE 0x0008
+#define wxST_ELLIPSIZE_END 0x0010
+
/**
@class wxStaticText
@see GetToolTip(), wxToolTip
*/
- void SetToolTip(const wxString& tip);
+ void SetToolTip(const wxString& tipString);
/**
@overload
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: withimages.h
+// Purpose: Interface of wxWithImages class.
+// RCS-ID: $Id:$
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ A mixin class to be used with other classes that use a wxImageList.
+*/
+class wxWithImages
+{
+public:
+ enum
+ {
+ NO_IMAGE = -1
+ };
+
+ wxWithImages();
+ virtual ~wxWithImages();
+
+ /**
+ Sets the image list for the page control and takes ownership of the list.
+
+ @see wxImageList, SetImageList()
+ */
+ void AssignImageList(wxImageList* imageList);
+
+ /**
+ Sets the image list to use. It does not take ownership of the image
+ list, you must delete it yourself.
+
+ @see wxImageList, AssignImageList()
+ */
+ virtual void SetImageList(wxImageList* imageList);
+
+ /**
+ Returns the associated image list, may be NULL.
+
+ @see wxImageList, SetImageList()
+ */
+ wxImageList* GetImageList() const;
+
+protected:
+ /**
+ Return true if we have a valid image list.
+ */
+ bool HasImageList() const;
+
+ /**
+ Return the image with the given index from the image list.
+
+ If there is no image list or if index == NO_IMAGE, silently returns
+ wxNullIcon.
+ */
+ wxIcon GetImage(int iconIndex) const;
+};