Debian Codegraph @

wxcrafter/controls/ribbon_gallery_wrapper.cpp

raw
1 #include "ribbon_gallery_wrapper.h"
2
3 #include "allocator_mgr.h"
4
5 #include <wx/ribbon/gallery.h>
6
7 RibbonGalleryWrapper::RibbonGalleryWrapper()
8 : wxcWidget(ID_WXRIBBONGALLERY)
9 {
10 SetPropertyString(_("Common Settings"), "wxRibbonGallery");
11 RegisterEvent("wxEVT_COMMAND_RIBBONGALLERY_SELECTED", "wxRibbonGalleryEvent",
12 _("Triggered when the user selects an item from the gallery. Note that the ID is that of the "
13 "gallery, not of the item."));
14 RegisterEvent("wxEVT_COMMAND_RIBBONGALLERY_CLICKED", "wxRibbonGalleryEvent",
15 _("Similar to EVT_RIBBONGALLERY_SELECTED but triggered every time a gallery item is clicked, even if "
16 "it is already selected. Note that the ID of the event is that of the gallery, not of the item, "
17 "just as above. This event is available since wxWidgets 2.9.2."));
18 RegisterEvent("wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED", "wxRibbonGalleryEvent",
19 _("Triggered when the item being hovered over by the user changes. The item in the event will be the "
20 "new item being hovered, or NULL if there is no longer an item being hovered. Note that the ID is "
21 "that of the gallery, not of the item."));
22 RegisterEventCommand("wxEVT_COMMAND_BUTTON_CLICKED",
23 _("Triggered when the \"extension\" button of the gallery is pressed"));
24 m_namePattern = "m_ribbonGallery";
25 SetName(GenerateName());
26 }
27
28 RibbonGalleryWrapper::~RibbonGalleryWrapper() {}
29
30 wxcWidget* RibbonGalleryWrapper::Clone() const { return new RibbonGalleryWrapper(); }
31
32 wxString RibbonGalleryWrapper::CppCtorCode() const
33 {
34 wxString cppCode;
35 cppCode << CPPStandardWxCtor("0");
36 return cppCode;
37 }
38
39 void RibbonGalleryWrapper::GetIncludeFile(wxArrayString& headers) const
40 {
41 headers.Add("#include <wx/ribbon/gallery.h>");
42 }
43
44 wxString RibbonGalleryWrapper::GetWxClassName() const { return "wxRibbonGallery"; }
45
46 void RibbonGalleryWrapper::ToXRC(wxString& text, XRC_TYPE type) const
47 {
48 text << XRCPrefix() << XRCCommonAttributes() << XRCStyle() << XRCSize();
49 ChildrenXRC(text, type);
50 text << XRCSuffix();
51 }