summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qa/cppunit/builder/demo.ui29
-rw-r--r--vcl/source/window/builder.cxx11
2 files changed, 40 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/builder/demo.ui b/vcl/qa/cppunit/builder/demo.ui
index 92904e7417df..e77dde16b6cb 100644
--- a/vcl/qa/cppunit/builder/demo.ui
+++ b/vcl/qa/cppunit/builder/demo.ui
@@ -45,6 +45,22 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton1">
+ <property name="label" translatable="yes">checkbutton</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -135,6 +151,19 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkEntry" id="entry1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="text" translatable="yes">an edit control</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 5bb7b284374a..882ac2f3c303 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -29,6 +29,7 @@
#include <vcl/builder.hxx>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
+#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
@@ -88,10 +89,18 @@ Window *VclBuilder::makeObject(Window *pParent, const rtl::OString &name, bool b
{
pWindow = new RadioButton(pParent, WB_CENTER|WB_VCENTER);
}
+ else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkCheckButton")))
+ {
+ pWindow = new CheckBox(pParent, WB_CENTER|WB_VCENTER);
+ }
else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkLabel")))
{
pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER);
}
+ else if (name.equalsL(RTL_CONSTASCII_STRINGPARAM("GtkEntry")))
+ {
+ pWindow = new Edit(pParent, WB_CENTER|WB_VCENTER);
+ }
else
{
fprintf(stderr, "TO-DO, implement %s\n", name.getStr());
@@ -153,6 +162,8 @@ Window *VclBuilder::insertObject(Window *pParent, const rtl::OString &rClass, st
pCurrentChild->SetStyle(nBits);
}
+ else if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("text")))
+ pCurrentChild->SetText(rtl::OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
else if
(
rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("expand")) ||