]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
Agrego la carpeta constructor para hacer algunas pruebas... uija!
authorNicolás Dimov <ndimov@gmail.com>
Fri, 17 Oct 2003 03:54:28 +0000 (03:54 +0000)
committerNicolás Dimov <ndimov@gmail.com>
Fri, 17 Oct 2003 03:54:28 +0000 (03:54 +0000)
Constructor/btn_salir.cpp [new file with mode: 0644]
Constructor/btn_salir.h [new file with mode: 0644]
Constructor/constructor.glade [new file with mode: 0644]
Constructor/constructor.glade.bak [new file with mode: 0644]
Constructor/constructor.gladep [new file with mode: 0644]
Constructor/constructor.gladep.bak [new file with mode: 0644]
Constructor/main.cpp [new file with mode: 0644]
Constructor/ventana [new file with mode: 0755]
Constructor/ventana.cpp [new file with mode: 0644]
Constructor/ventana.h [new file with mode: 0644]
tests/GUI/dndwindow.h

diff --git a/Constructor/btn_salir.cpp b/Constructor/btn_salir.cpp
new file mode 100644 (file)
index 0000000..87a850b
--- /dev/null
@@ -0,0 +1,15 @@
+//btn_salir.cpp
+#include "btn_salir.h"
+BtnSalir::BtnSalir(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade)
+{
+       //btn_salir.signal_released().connect(SigC::slot(*this,&BtnSalir::on_pressed));
+}              
+
+BtnSalir::~BtnSalir()
+{
+}
+
+void BtnSalir::on_pressed()
+{
+       Gtk::Main::quit();
+}
diff --git a/Constructor/btn_salir.h b/Constructor/btn_salir.h
new file mode 100644 (file)
index 0000000..6717254
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef BTN_SALIR_H
+#define BTN_SALIR_H
+#include <gtkmm.h>
+#include <gtkmm/button.h>
+#include <libglademm.h>
+class BtnSalir : public Gtk::Button{
+public: 
+               BtnSalir(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
+               virtual ~BtnSalir();
+protected:
+               virtual void on_pressed();
+};
+
+#endif
diff --git a/Constructor/constructor.glade b/Constructor/constructor.glade
new file mode 100644 (file)
index 0000000..5afaf80
--- /dev/null
@@ -0,0 +1,312 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="window1">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkAlignment" id="alignment1">
+         <property name="visible">True</property>
+         <property name="xalign">0.5</property>
+         <property name="yalign">0.5</property>
+         <property name="xscale">1</property>
+         <property name="yscale">1</property>
+
+         <child>
+           <widget class="GtkMenuBar" id="menubar1">
+             <property name="visible">True</property>
+
+             <child>
+               <widget class="GtkMenuItem" id="menuitem1">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_File</property>
+                 <property name="use_underline">True</property>
+
+                 <child>
+                   <widget class="GtkMenu" id="menu1">
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="new1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-new</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_new1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="open1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-open</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_open1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="save1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-save</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_save1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="save_as1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-save-as</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_save_as1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                         <property name="visible">True</property>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="quit1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-quit</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_quit1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkMenuItem" id="menuitem2">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_Edit</property>
+                 <property name="use_underline">True</property>
+
+                 <child>
+                   <widget class="GtkMenu" id="menu2">
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="copy1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-copy</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_copy1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="paste1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-paste</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_paste1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="delete1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-delete</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_delete1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkMenuItem" id="menuitem3">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_View</property>
+                 <property name="use_underline">True</property>
+
+                 <child>
+                   <widget class="GtkMenu" id="menu3">
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkMenuItem" id="menuitem4">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_Help</property>
+                 <property name="use_underline">True</property>
+
+                 <child>
+                   <widget class="GtkMenu" id="menu4">
+
+                     <child>
+                       <widget class="GtkMenuItem" id="about1">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_About</property>
+                         <property name="use_underline">True</property>
+                         <signal name="activate" handler="on_about1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkAlignment" id="alignment2">
+         <property name="visible">True</property>
+         <property name="xalign">0.5</property>
+         <property name="yalign">0.5</property>
+         <property name="xscale">1</property>
+         <property name="yscale">1</property>
+
+         <child>
+           <widget class="GtkHBox" id="hbox1">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox2">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkVButtonBox" id="vbuttonbox1">
+                     <property name="height_request">1</property>
+                     <property name="visible">True</property>
+                     <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkButton" id="button6">
+                         <property name="visible">True</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">button6</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="button7">
+                         <property name="visible">True</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">button7</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="button8">
+                         <property name="visible">True</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">button8</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                       </widget>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                 <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                 <property name="shadow_type">GTK_SHADOW_NONE</property>
+                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                 <child>
+                   <widget class="GtkViewport" id="viewport1">
+                     <property name="visible">True</property>
+                     <property name="shadow_type">GTK_SHADOW_IN</property>
+
+                     <child>
+                       <widget class="GtkFixed" id="fixed1">
+                         <property name="visible">True</property>
+
+                         <child>
+                           <widget class="GtkButton" id="button9">
+                             <property name="width_request">53</property>
+                             <property name="height_request">27</property>
+                             <property name="visible">True</property>
+                             <property name="can_focus">True</property>
+                             <property name="label" translatable="yes">button9</property>
+                             <property name="use_underline">True</property>
+                             <property name="relief">GTK_RELIEF_NORMAL</property>
+                           </widget>
+                           <packing>
+                             <property name="x">64</property>
+                             <property name="y">80</property>
+                           </packing>
+                         </child>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/Constructor/constructor.glade.bak b/Constructor/constructor.glade.bak
new file mode 100644 (file)
index 0000000..ba34417
--- /dev/null
@@ -0,0 +1,294 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="window1">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+       <widget class="GtkAlignment" id="alignment1">
+         <property name="visible">True</property>
+         <property name="xalign">0.5</property>
+         <property name="yalign">0.5</property>
+         <property name="xscale">1</property>
+         <property name="yscale">1</property>
+
+         <child>
+           <widget class="GtkMenuBar" id="menubar1">
+             <property name="visible">True</property>
+
+             <child>
+               <widget class="GtkMenuItem" id="menuitem1">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_File</property>
+                 <property name="use_underline">True</property>
+
+                 <child>
+                   <widget class="GtkMenu" id="menu1">
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="new1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-new</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_new1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="open1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-open</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_open1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="save1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-save</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_save1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="save_as1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-save-as</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_save_as1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                         <property name="visible">True</property>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="quit1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-quit</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_quit1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkMenuItem" id="menuitem2">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_Edit</property>
+                 <property name="use_underline">True</property>
+
+                 <child>
+                   <widget class="GtkMenu" id="menu2">
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="copy1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-copy</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_copy1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="paste1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-paste</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_paste1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkImageMenuItem" id="delete1">
+                         <property name="visible">True</property>
+                         <property name="label">gtk-delete</property>
+                         <property name="use_stock">True</property>
+                         <signal name="activate" handler="on_delete1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkMenuItem" id="menuitem3">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_View</property>
+                 <property name="use_underline">True</property>
+
+                 <child>
+                   <widget class="GtkMenu" id="menu3">
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+
+             <child>
+               <widget class="GtkMenuItem" id="menuitem4">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">_Help</property>
+                 <property name="use_underline">True</property>
+
+                 <child>
+                   <widget class="GtkMenu" id="menu4">
+
+                     <child>
+                       <widget class="GtkMenuItem" id="about1">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes">_About</property>
+                         <property name="use_underline">True</property>
+                         <signal name="activate" handler="on_about1_activate" last_modification_time="Tue, 14 Oct 2003 11:17:30 GMT"/>
+                       </widget>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">False</property>
+         <property name="fill">False</property>
+       </packing>
+      </child>
+
+      <child>
+       <widget class="GtkAlignment" id="alignment2">
+         <property name="visible">True</property>
+         <property name="xalign">0.5</property>
+         <property name="yalign">0.5</property>
+         <property name="xscale">1</property>
+         <property name="yscale">1</property>
+
+         <child>
+           <widget class="GtkHBox" id="hbox1">
+             <property name="visible">True</property>
+             <property name="homogeneous">False</property>
+             <property name="spacing">0</property>
+
+             <child>
+               <widget class="GtkVBox" id="vbox2">
+                 <property name="visible">True</property>
+                 <property name="homogeneous">False</property>
+                 <property name="spacing">0</property>
+
+                 <child>
+                   <widget class="GtkVButtonBox" id="vbuttonbox1">
+                     <property name="height_request">1</property>
+                     <property name="visible">True</property>
+                     <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+                     <property name="spacing">0</property>
+
+                     <child>
+                       <widget class="GtkButton" id="button6">
+                         <property name="visible">True</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">button6</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="button7">
+                         <property name="visible">True</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">button7</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                       </widget>
+                     </child>
+
+                     <child>
+                       <widget class="GtkButton" id="button8">
+                         <property name="visible">True</property>
+                         <property name="can_default">True</property>
+                         <property name="can_focus">True</property>
+                         <property name="label" translatable="yes">button8</property>
+                         <property name="use_underline">True</property>
+                         <property name="relief">GTK_RELIEF_NORMAL</property>
+                       </widget>
+                     </child>
+                   </widget>
+                   <packing>
+                     <property name="padding">0</property>
+                     <property name="expand">True</property>
+                     <property name="fill">True</property>
+                   </packing>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">False</property>
+                 <property name="fill">False</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkScrolledWindow" id="scrolledwindow1">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                 <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+                 <property name="shadow_type">GTK_SHADOW_NONE</property>
+                 <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+                 <child>
+                   <widget class="GtkViewport" id="viewport1">
+                     <property name="visible">True</property>
+                     <property name="shadow_type">GTK_SHADOW_IN</property>
+
+                     <child>
+                       <placeholder/>
+                     </child>
+                   </widget>
+                 </child>
+               </widget>
+               <packing>
+                 <property name="padding">0</property>
+                 <property name="expand">True</property>
+                 <property name="fill">True</property>
+               </packing>
+             </child>
+           </widget>
+         </child>
+       </widget>
+       <packing>
+         <property name="padding">0</property>
+         <property name="expand">True</property>
+         <property name="fill">True</property>
+       </packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+</glade-interface>
diff --git a/Constructor/constructor.gladep b/Constructor/constructor.gladep
new file mode 100644 (file)
index 0000000..183077b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name></name>
+  <program_name></program_name>
+  <gnome_support>FALSE</gnome_support>
+</glade-project>
diff --git a/Constructor/constructor.gladep.bak b/Constructor/constructor.gladep.bak
new file mode 100644 (file)
index 0000000..183077b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name></name>
+  <program_name></program_name>
+  <gnome_support>FALSE</gnome_support>
+</glade-project>
diff --git a/Constructor/main.cpp b/Constructor/main.cpp
new file mode 100644 (file)
index 0000000..2768d48
--- /dev/null
@@ -0,0 +1,30 @@
+// g++ -Wall -g `pkg-config --cflags --libs libglademm-2.0` -o ventana main.cc ventana.cc
+
+#include <iostream>
+#include <libglademm.h>
+#include <gtkmm.h>
+#include "ventana.h"
+int main (int argc, char **argv) 
+{
+  Gtk::Main kit(argc, argv);
+                                                                                                         
+  //Load the Glade file and instiate its widgets:
+  Glib::RefPtr<Gnome::Glade::Xml> refXml;
+  try
+  {
+    refXml = Gnome::Glade::Xml::create("constructor.glade");
+  } 
+  catch(const Gnome::Glade::XmlError& ex)
+  {
+    std::cerr << ex.what() << std::endl;
+    return 1;
+  }
+                                                                                                         
+  Ventana* pWindow = 0;
+  refXml->get_widget_derived("window1", pWindow);
+  pWindow->set_title("Una ventana posta");
+ // refXml->get_widget_derived("button9",btn_salir);
+//  btn_salir->signal_released().connect(SigC::slot(*this,&BtnSalir::on_pressed));
+  kit.run(*pWindow);
+  return 0;
+}
diff --git a/Constructor/ventana b/Constructor/ventana
new file mode 100755 (executable)
index 0000000..6116fa3
Binary files /dev/null and b/Constructor/ventana differ
diff --git a/Constructor/ventana.cpp b/Constructor/ventana.cpp
new file mode 100644 (file)
index 0000000..d175fc9
--- /dev/null
@@ -0,0 +1,16 @@
+//ventana.cpp
+#include "ventana.h"
+Ventana::Ventana(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade):
+Gtk::Window(cobject) 
+{
+       btn_salir.signal_released().connect(SigC::slot(*this,&Ventana::on_btn_salir_pressed ));
+}
+
+Ventana::~Ventana()
+{
+}
+
+void Ventana::on_btn_salir_pressed()
+{
+       Gtk::Main::quit();
+}
diff --git a/Constructor/ventana.h b/Constructor/ventana.h
new file mode 100644 (file)
index 0000000..8c47dd9
--- /dev/null
@@ -0,0 +1,19 @@
+//ventana.h
+#ifndef _VENTANA_H_
+#define _VENTANA_H_
+#include <gtkmm.h>
+#include <libglademm.h>
+#include <gtkmm/window.h>
+#include <gtkmm/button.h>
+class Ventana: public Gtk::Window
+{
+       public: 
+                       Ventana(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
+                       virtual ~Ventana();
+       protected:
+                       Gtk::Button btn_salir;
+                       virtual void on_btn_salir_pressed();
+       
+};
+
+#endif
index 2ab5843a9e5616047c06e6fe113fd82bc4a74ba7..5f55b10ad7db6b4ba79295abced0034a44a411ad 100644 (file)
@@ -41,7 +41,7 @@ protected:
   virtual void on_y_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
   virtual void on_codo_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time);
        virtual void on_label_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, GtkSelectionData* selection_data, guint info, guint time);
-  // Señales para cambiar el icono cuando empieza el drag.
+  // Señales para cambiar el icono cuando empieza el drag.
   virtual void on_canio_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
   virtual void on_y_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
   virtual void on_codo_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);