Kaydet (Commit) 07b0ad4f authored tarafından Jan Holesovsky's avatar Jan Holesovsky

sidebar conversion tutorial: Create entry points for custom widgets.

For custom widgets, you need an external function named 'makeXYZ' where XYZ is
name of the type you want to construct.  It exists for many already, but for
those that don't yet, you need to create that.

Change-Id: I3ad65886897fa73764af2372ceffeca1a57f3165
üst 4774976d
......@@ -27,6 +27,7 @@ namespace svx { namespace sidebar {
class SVX_DLLPUBLIC SidebarDialControl : public svx::DialControl
{
public:
SidebarDialControl (Window* pParent, WinBits nBits = 0);
SidebarDialControl (Window* pParent, const ResId& rResId);
virtual ~SidebarDialControl (void);
......
......@@ -285,7 +285,7 @@
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkScaleButton" id="orientationcontrol">
<object class="svxlo-SidebarDialControl" id="orientationcontrol">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......
......@@ -22,6 +22,20 @@
namespace svx { namespace sidebar {
SidebarDialControl::SidebarDialControl (Window* pParent, WinBits nBits)
: svx::DialControl(pParent, nBits)
{
mpImpl->mpBmpEnabled.reset(new SidebarDialControlBmp(*this));
mpImpl->mpBmpDisabled.reset(new SidebarDialControlBmp(*this));
mpImpl->mpBmpBuffered.reset(new SidebarDialControlBmp(*this));
Init(GetOutputSizePixel());
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSidebarDialControl(Window *pParent)
{
return new SidebarDialControl(pParent, WB_TABSTOP);
}
SidebarDialControl::SidebarDialControl (
Window* pParent,
const ResId& rResId)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment