]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/ribbon/control.h
Fix missing documentation for several GDI functions.
[wxWidgets.git] / include / wx / ribbon / control.h
index e1066a615c4caebe3c36d9d667197248898b80e0..9fd1b92a1d6f353e5a3bd5eb9bf1e211f9233e47 100644 (file)
 #include "wx/control.h"
 #include "wx/dynarray.h"
 
+class wxRibbonBar;
 class wxRibbonArtProvider;
 
 class WXDLLIMPEXP_RIBBON wxRibbonControl : public wxControl
 {
 public:
-    wxRibbonControl() { m_art = NULL; }
+    wxRibbonControl() { Init(); }
 
     wxRibbonControl(wxWindow *parent, wxWindowID id,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize, long style = 0,
                     const wxValidator& validator = wxDefaultValidator,
-                    const wxString& name = wxControlNameStr);
+                    const wxString& name = wxControlNameStr)
+    {
+        Init();
+
+        Create(parent, id, pos, size, style, validator, name);
+    }
+
+    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);
 
     virtual void SetArtProvider(wxRibbonArtProvider* art);
     wxRibbonArtProvider* GetArtProvider() const {return m_art;}
@@ -44,6 +56,11 @@ public:
     virtual bool Realize();
     bool Realise() {return Realize();}
 
+    virtual wxRibbonBar* GetAncestorRibbonBar()const;
+
+    // Finds the best width and height given the parent's width and height
+    virtual wxSize GetBestSizeForParentSize(const wxSize& WXUNUSED(parentSize)) const { return GetBestSize(); }
+
 protected:
     wxRibbonArtProvider* m_art;
 
@@ -52,12 +69,15 @@ protected:
     virtual wxSize DoGetNextLargerSize(wxOrientation direction,
                                        wxSize relative_to) const;
 
+private:
+    void Init() { m_art = NULL; }
+
 #ifndef SWIG
     DECLARE_CLASS(wxRibbonControl)
 #endif
 };
 
-WX_DEFINE_USER_EXPORTED_ARRAY(wxRibbonControl*, wxArrayRibbonControl, class WXDLLIMPEXP_RIBBON);
+WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxRibbonControl*, wxArrayRibbonControl, class WXDLLIMPEXP_RIBBON);
 
 #endif // wxUSE_RIBBON