1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _ribbon.sip 8// 9//--------------------------------------------------------------------------- 10 11%ModuleHeaderCode 12#include <wx/ribbon/gallery.h> 13%End 14 15 16//--------------------------------------------------------------------------- 17 18 // forward declarations 19 class wxRibbonGalleryItem; 20 21 22enum wxRibbonGalleryButtonState 23{ 24 wxRIBBON_GALLERY_BUTTON_NORMAL, 25 wxRIBBON_GALLERY_BUTTON_HOVERED, 26 wxRIBBON_GALLERY_BUTTON_ACTIVE, 27 wxRIBBON_GALLERY_BUTTON_DISABLED 28}; 29 30wxEventType wxEVT_RIBBONGALLERY_HOVER_CHANGED /PyName=wxEVT_RIBBONGALLERY_HOVER_CHANGED/; 31 32wxEventType wxEVT_RIBBONGALLERY_SELECTED /PyName=wxEVT_RIBBONGALLERY_SELECTED/; 33 34wxEventType wxEVT_RIBBONGALLERY_CLICKED /PyName=wxEVT_RIBBONGALLERY_CLICKED/; 35 36class wxRibbonGallery : wxRibbonControl 37{ 38 %Docstring 39 RibbonGallery() 40 RibbonGallery(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0) 41 42 A ribbon gallery is like a wxListBox, but for bitmaps rather than 43 strings. 44 %End 45 %TypeHeaderCode 46 #include <wx/ribbon/gallery.h> 47 %End 48 49public: 50 wxRibbonGallery(); 51 %PreMethodCode 52 if (!wxPyCheckForApp()) return NULL; 53 %End 54 55 wxRibbonGallery( 56 wxWindow * parent /TransferThis/, 57 wxWindowID id = wxID_ANY, 58 const wxPoint & pos = wxDefaultPosition, 59 const wxSize & size = wxDefaultSize, 60 long style = 0 61 ); 62 %PreMethodCode 63 if (!wxPyCheckForApp()) return NULL; 64 %End 65 66 ~wxRibbonGallery(); 67 68 bool Create( 69 wxWindow * parent /TransferThis/, 70 wxWindowID id = wxID_ANY, 71 const wxPoint & pos = wxDefaultPosition, 72 const wxSize & size = wxDefaultSize, 73 long style = 0 74 ); 75 %Docstring 76 Create(parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0) -> bool 77 78 Create a gallery in two-step gallery construction. 79 %End 80 81 void Clear(); 82 %Docstring 83 Clear() 84 85 Remove all items from the gallery. 86 %End 87 88 bool IsEmpty() const; 89 %Docstring 90 IsEmpty() -> bool 91 92 Query if the gallery has no items in it. 93 %End 94 95 unsigned int GetCount() const; 96 %Docstring 97 GetCount() -> unsignedint 98 99 Get the number of items in the gallery. 100 %End 101 102 wxRibbonGalleryItem * GetItem( 103 unsigned int n 104 ); 105 %Docstring 106 GetItem(n) -> RibbonGalleryItem 107 108 Get an item by index. 109 %End 110 111 wxRibbonGalleryItem * Append( 112 const wxBitmap & bitmap, 113 int id 114 ); 115 %Docstring 116 Append(bitmap, id) -> RibbonGalleryItem 117 Append(bitmap, id, clientData) -> RibbonGalleryItem 118 119 Add an item to the gallery (with no client data). 120 %End 121 122 wxRibbonGalleryItem * Append( 123 const wxBitmap & bitmap, 124 int id, 125 wxClientData * clientData /Transfer/ 126 ); 127 128 void SetItemClientObject( 129 wxRibbonGalleryItem * item, 130 wxClientData * data /Transfer/ 131 ) /PyName=SetItemClientData/; 132 %Docstring 133 SetItemClientData(item, data) 134 135 Set the client object associated with a gallery item. 136 %End 137 138 wxClientData * GetItemClientObject( 139 const wxRibbonGalleryItem * item 140 ) const /PyName=GetItemClientData/; 141 %Docstring 142 GetItemClientData(item) -> ClientData 143 144 Get the client object associated with a gallery item. 145 %End 146 147 void SetSelection( 148 wxRibbonGalleryItem * item 149 ); 150 %Docstring 151 SetSelection(item) 152 153 Set the selection to the given item, or removes the selection if item 154 == NULL. 155 %End 156 157 wxRibbonGalleryItem * GetSelection() const; 158 %Docstring 159 GetSelection() -> RibbonGalleryItem 160 161 Get the currently selected item, or NULL if there is none. 162 %End 163 164 wxRibbonGalleryItem * GetHoveredItem() const; 165 %Docstring 166 GetHoveredItem() -> RibbonGalleryItem 167 168 Get the currently hovered item, or NULL if there is none. 169 %End 170 171 wxRibbonGalleryItem * GetActiveItem() const; 172 %Docstring 173 GetActiveItem() -> RibbonGalleryItem 174 175 Get the currently active item, or NULL if there is none. 176 %End 177 178 wxRibbonGalleryButtonState GetUpButtonState() const; 179 %Docstring 180 GetUpButtonState() -> RibbonGalleryButtonState 181 182 Get the state of the scroll up button. 183 %End 184 185 wxRibbonGalleryButtonState GetDownButtonState() const; 186 %Docstring 187 GetDownButtonState() -> RibbonGalleryButtonState 188 189 Get the state of the scroll down button. 190 %End 191 192 wxRibbonGalleryButtonState GetExtensionButtonState() const; 193 %Docstring 194 GetExtensionButtonState() -> RibbonGalleryButtonState 195 196 Get the state of the "extension" button. 197 %End 198 199 bool IsHovered() const; 200 %Docstring 201 IsHovered() -> bool 202 203 Query is the mouse is currently hovered over the gallery. 204 %End 205 206 bool ScrollLines( 207 int lines 208 ); 209 %Docstring 210 ScrollLines(lines) -> bool 211 212 Scroll the gallery contents by some amount. 213 %End 214 215 bool ScrollPixels( 216 int pixels 217 ); 218 %Docstring 219 ScrollPixels(pixels) -> bool 220 221 Scroll the gallery contents by some fine-grained amount. 222 %End 223 224 void EnsureVisible( 225 const wxRibbonGalleryItem * item 226 ); 227 %Docstring 228 EnsureVisible(item) 229 230 Scroll the gallery to ensure that the given item is visible. 231 %End 232 233 public: 234 virtual wxPoint GetClientAreaOrigin() const; 235 virtual bool Validate(); 236 virtual bool TransferDataToWindow(); 237 virtual bool TransferDataFromWindow(); 238 virtual void InitDialog(); 239 virtual bool AcceptsFocus() const; 240 virtual bool AcceptsFocusRecursively() const; 241 virtual bool AcceptsFocusFromKeyboard() const; 242 virtual void AddChild( wxWindowBase *child ); 243 virtual void RemoveChild( wxWindowBase *child ); 244 virtual void InheritAttributes(); 245 virtual bool ShouldInheritColours() const; 246 virtual void OnInternalIdle(); 247 virtual wxWindow *GetMainWindowOfCompositeControl(); 248 virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); 249 virtual void SetCanFocus(bool canFocus); 250 virtual bool Destroy(); 251 virtual void SetValidator( const wxValidator &validator ); 252 virtual wxValidator* GetValidator(); 253 254 255 protected: 256 virtual bool ProcessEvent(wxEvent & event); 257 virtual void DoEnable(bool enable); 258 virtual void DoGetPosition(int *x, int *y) const; 259 virtual void DoGetSize(int *width, int *height) const; 260 virtual void DoGetClientSize(int *width, int *height) const; 261 virtual wxSize DoGetBestSize() const; 262 virtual wxSize DoGetBestClientSize() const; 263 virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); 264 virtual void DoSetClientSize(int width, int height); 265 virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); 266 virtual wxSize DoGetBorderSize() const; 267 virtual void DoMoveWindow(int x, int y, int width, int height); 268 virtual void DoSetWindowVariant( wxWindowVariant variant); 269 virtual wxBorder GetDefaultBorder() const; 270 virtual wxBorder GetDefaultBorderForControl() const; 271 virtual void DoFreeze(); 272 virtual void DoThaw(); 273 virtual bool HasTransparentBackground(); 274 virtual bool TryBefore(wxEvent& event); 275 virtual bool TryAfter(wxEvent& event); 276 277 278 public: 279 280 281 static 282 wxVisualAttributes GetClassDefaultAttributes( 283 wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL 284 ); 285 %Docstring 286 GetClassDefaultAttributes(variant=wx.WINDOW_VARIANT_NORMAL) -> wx.VisualAttributes 287 %End 288 %PreMethodCode 289 if (!wxPyCheckForApp()) return NULL; 290 %End 291 292 public: 293 294 295 %Property(name=ActiveItem, get=GetActiveItem) 296 %Property(name=Count, get=GetCount) 297 %Property(name=DownButtonState, get=GetDownButtonState) 298 %Property(name=ExtensionButtonState, get=GetExtensionButtonState) 299 %Property(name=HoveredItem, get=GetHoveredItem) 300 %Property(name=Selection, get=GetSelection, set=SetSelection) 301 %Property(name=UpButtonState, get=GetUpButtonState) 302}; // end of class wxRibbonGallery 303 304 305class wxRibbonGalleryEvent : wxCommandEvent 306{ 307 %Docstring 308 RibbonGalleryEvent(command_type=wx.wxEVT_NULL, win_id=0, gallery=None, item=None) 309 %End 310 %TypeHeaderCode 311 #include <wx/ribbon/gallery.h> 312 %End 313 314public: 315 wxRibbonGalleryEvent( 316 wxEventType command_type = wxEVT_NULL, 317 int win_id = 0, 318 wxRibbonGallery * gallery = NULL, 319 wxRibbonGalleryItem * item = NULL 320 ); 321 322 wxRibbonGallery * GetGallery(); 323 %Docstring 324 GetGallery() -> RibbonGallery 325 326 Returns the gallery which the event relates to. 327 %End 328 329 wxRibbonGalleryItem * GetGalleryItem(); 330 %Docstring 331 GetGalleryItem() -> RibbonGalleryItem 332 333 Returns the gallery item which the event relates to, or NULL if it 334 does not relate to an item. 335 %End 336 337 void SetGallery( 338 wxRibbonGallery * gallery 339 ); 340 %Docstring 341 SetGallery(gallery) 342 343 Sets the gallery relating to this event. 344 %End 345 346 void SetGalleryItem( 347 wxRibbonGalleryItem * item 348 ); 349 %Docstring 350 SetGalleryItem(item) 351 352 Sets the gallery item relating to this event. 353 %End 354 355 public: 356 virtual wxEvent* Clone() const /Factory/; 357 358 359 private: 360 wxRibbonGalleryEvent& operator=(const wxRibbonGalleryEvent&); 361 362 363 public: 364 365 366 %Property(name=Gallery, get=GetGallery, set=SetGallery) 367 %Property(name=GalleryItem, get=GetGalleryItem, set=SetGalleryItem) 368}; // end of class wxRibbonGalleryEvent 369 370 371%Extract(id=pycode_ribbon) 372EVT_RIBBONGALLERY_HOVER_CHANGED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_HOVER_CHANGED, 1 ) 373EVT_RIBBONGALLERY_SELECTED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_SELECTED, 1 ) 374EVT_RIBBONGALLERY_CLICKED = wx.PyEventBinder( wxEVT_RIBBONGALLERY_CLICKED, 1 ) 375 376%End 377 378 379//--------------------------------------------------------------------------- 380 381