gtk_widget_class_set_template_from_resource



Hi all

What is the equivalent of this? Trying to write gtkmm derived widget
and it will be nice that will be possible to use it. According to an
old thread seems not really easy. Now

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
  <requires lib="gtk+" version="3.0"/>
  <object class="topHeader" >
    <child>
      <object class="GtkButton" id="setting_button">
        <property name="visible">true</property>
        <property name="label" translatable="yes">New</property>
      </object>
      <packing>
        <property name="expand">False</property>
        <property name="fill">True</property>
        <property name="position">0</property>
      </packing>
    </child>
    <child>
      <object class="gtkmm__CustomObject_dateLabel" id="date_label">
        <property name="visible">true</property>
      </object>
      <packing>
        <property name="expand">false</property>
        <property name="fill">true</property>
        <property name="position">1</property>
      </packing>
    </child>
    <child>
      <object class="gtkmm__CustomObject_wifiSignalIcon" id="wifi_status">
        <property name="visible">true</property>
      </object>
      <packing>
        <property name="expand">False</property>
        <property name="fill">True</property>
        <property name="position">2</property>
      </packing>
    </child>
  </object>
</interface>

I have tried with template instead of object but I'm not able to apply
to main ui.

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
  <requires lib="gtk+" version="3.20"/>
  <object class="GtkApplicationWindow" id="window">
    <property name="width-request">1024</property>
    <property name="height-request">800</property>
    <property name="can-focus">False</property>
    <child>
      <object class="GtkBox" id="main_box" >
        <property name="visible">True</property>
        <property name="can-focus">False</property>
        <property name="orientation">vertical</property>
        <child>
          <object class="gtkmm__CustomObject_topHeader" id="top_header" />
          <packing>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkLabel" id="alexa_status">
            <property name="visible">True</property>
            <property name="can-focus">False</property>
          </object>
          <packing>
            <property name="expand">false</property>
            <property name="fill">true</property>
            <property name="position">1</property>
          </packing>
        </child>
        <child>
          <object class="GtkScrolledWindow" id="scrolled_webview">
            <property name="visible">True</property>
            <property name="can-focus">True</property>
          </object>
          <packing>
            <property name="expand">True</property>
            <property name="fill">True</property>
            <property name="position">2</property>
          </packing>
        </child>
       </object>
    </child>
  </object>
</interface>

Any suggestion? If the gtkmm__CustomObject_dateLabel is on the main ui
is visible but not in this case

Michael

-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael amarulasolutions com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info amarulasolutions com
www.amarulasolutions.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]