Commit [r10220] Maximize Restore History

Create new folders to accomidate GTK2 and GTK3 sources.

wdashley 2014-06-18

1 2 3 .. 9 > >> (Page 1 of 9)
added /rexxgtk/trunk/GTKv2/src/grxtextview.cpp
copied /rexxgtk/trunk/test4-5.rex -> /rexxgtk/trunk/GTKv2/test/test4-11.rex
copied /rexxgtk/trunk/test8-1.rex -> /rexxgtk/trunk/GTKv2/src/grxeventbox.cpp
copied /rexxgtk/trunk/test4-7.rex -> /rexxgtk/trunk/GTKv2/src/grximage.cpp
copied /rexxgtk/trunk/test4-9.rex -> /rexxgtk/trunk/GTKv2/src/grxadjustment.cpp
copied /rexxgtk/trunk/test8-7.rex -> /rexxgtk/trunk/GTKv2/src/grxmenuitem.cpp
copied /rexxgtk/trunk/test5-10.rex -> /rexxgtk/trunk/GTKv2/src/grxcombobox.cpp
copied /rexxgtk/trunk/grxnotebook.cpp -> /rexxgtk/trunk/GTKv2/src/grxnotebook.cpp
copied /rexxgtk/trunk/rexxgtk.h -> /rexxgtk/trunk/GTKv2/src/rexxgtk.h
copied /rexxgtk/trunk/grxmenuitem.cpp -> /rexxgtk/trunk/GTKv2/src/grxtoolbutton.cpp
copied /rexxgtk/trunk/grxtable.cpp -> /rexxgtk/trunk/GTKv2/src/grxwindow.cpp
copied /rexxgtk/trunk/grxeventbox.cpp -> /rexxgtk/trunk/GTKv2/src/grxglib.cpp
copied /rexxgtk/trunk/grxwindow.cpp -> /rexxgtk/trunk/GTKv2/src/grxcontainer.cpp
/rexxgtk/trunk/GTKv2/src/grxtextview.cpp Diff Switch to side-by-side view
Loading...
/rexxgtk/trunk/test4-5.rex to /rexxgtk/trunk/GTKv2/test/test4-11.rex
--- a/rexxgtk/trunk/test4-5.rex
+++ b/rexxgtk/trunk/GTKv2/test/test4-11.rex
@@ -40,31 +40,29 @@
 /*----------------------------------------------------------------------------*/
 
 
--- Derived from Listing 4-5
+-- Derived from Listing 4-11
 -- Foundations of GTK+ Development
 -- by Andrew Krause
 
 call gtk_init
 window = .myMainWindow~new(.gtk~GTK_WINDOW_TOPLEVEL)
-window~set_title('Password')
+window~set_title('Font Button')
 window~signal_connect("destroy")
 window~set_border_width(10)
 
-str = 'What is the password for' userid() || '?'
-question = .GtkLabel~new(str)
-label = .GtkLabel~new('Password:')
+initial_font = 'Sans Bold 12'
+label = .GtkLabel~new('Look at the font!')
+label~modify_font(initial_font)
 
-pass = .GtkEntry~new()
-pass~set_visibility(.false)
-pass~set_invisible_char('*')
+button = .MyButton~newWithFont(initial_font)
+button~set_title('Choose a Font')
+button~user_data = label
 
-hbox = .GtkHBox~new(.false, 5)
-hbox~pack_start_defaults(label)
-hbox~pack_start_defaults(pass)
+button~signal_connect('font_set')
 
 vbox = .GtkVBox~new(.false, 5)
-vbox~pack_start_defaults(question)
-vbox~pack_start_defaults(hbox)
+vbox~pack_start_defaults(button)
+vbox~pack_start_defaults(label)
 
 window~add(vbox)
 window~show_all()
@@ -81,3 +79,11 @@
 call gtk_main_quit
 return
 
+::class MyButton subclass GtkFontButton
+
+::method signal_font_set
+font = self~get_font_name()
+self~user_data~set_label(font)
+self~user_data~modify_font(font)
+return
+
/rexxgtk/trunk/test8-1.rex to /rexxgtk/trunk/GTKv2/src/grxeventbox.cpp
--- a/rexxgtk/trunk/test8-1.rex
+++ b/rexxgtk/trunk/GTKv2/src/grxeventbox.cpp
@@ -1,4 +1,3 @@
-#!/usr/bin/rexx
 /*----------------------------------------------------------------------------*/
 /*                                                                            */
 /* Copyright (c) 2007-2008 Rexx Language Association. All rights reserved.    */
@@ -40,84 +39,94 @@
 /*----------------------------------------------------------------------------*/
 
 
--- Derived from Listing 8-1
--- Foundations of GTK+ Development
--- by Andrew Krause
+/* include the linux headers and our local stuff */
+#include "rexxgtk.h"
 
-call gtk_init
-BUY_IT = 0
-QUANTITY = 1
-PRODUCT = 2
-COLUMNS = 3
 
-list = .array~new(1)
-list[1] = .GroceryItem~new(.true, 1, 'Paper Towels')
-list[2] = .GroceryItem~new(.true, 2, 'Bread')
-list[3] = .GroceryItem~new(.false, 1, 'Butter')
-list[4] = .GroceryItem~new(.true, 1, 'Milk')
-list[5] = .GroceryItem~new(.false, 3, 'Chips')
-list[6] = .GroceryItem~new(.true, 4, 'Soda')
+/*----------------------------------------------------------------------------*/
+/* Global variables                                                           */
+/*----------------------------------------------------------------------------*/
 
-window = .myMainWindow~new(.gtk~GTK_WINDOW_TOPLEVEL)
-window~set_title('Grocery List')
-window~signal_connect('destroy')
-window~set_border_width(10)
-window~set_size_request(250, 175)
 
-treeview = .GtkTreeview~new()
-call setup_tree_view treeview, BUY_IT, QUANTITY, PRODUCT
+/*----------------------------------------------------------------------------*/
+/* Local Definitions                                                          */
+/*----------------------------------------------------------------------------*/
 
-store = .GtkListStore~new(.gtk~G_TYPE_BOOLEAN, .gtk~G_TYPE_INT, .gtk~G_TYPE_STRING)
 
-do item over list
-   iter = store~append()
-   store~set_value(iter, BUY_IT, item~buy, QUANTITY, item~quantity,,
-                   PRODUCT, item~product)
-   end
+/*============================================================================*/
+/* Private Functions                                                          */
+/*============================================================================*/
 
-treeview~set_model(store)
 
-scrolled_win = .GtkScrolledWindow~new(.nil, .nil)
-scrolled_win~set_policy(.gtk~GTK_POLICY_AUTOMATIC, .gtk~GTK_POLICY_AUTOMATIC)
+/*============================================================================*/
+/* Public Functions                                                           */
+/*============================================================================*/
 
-scrolled_win~add(treeview)
-window~add(scrolled_win)
-window~show_all()
+/**
+ * Method:  init
+ *
+ * Create an event box.
+ *
+ * @return        Zero.
+ **/
+RexxMethod1(int,                       // Return type
+            GrxEventBoxNew,            // Object_method name
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = gtk_event_box_new();
 
-call gtk_main
-return
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
 
-::requires 'rexxgtk.cls'
+    return 0;
+}
 
-::routine setup_tree_view
-use strict arg treeview, BUY_IT, QUANTITY, PRODUCT
+/**
+ * Method:  set/get_above_child 
+ * 
+ * Set/get the z-order position with respect to a child.
+ * 
+ * @param flag   Z-order flag.
+ *
+ * @return        Zero.
+ */
+RexxMethod2(int,                       // Return type
+            GrxEventBoxGetSetAboveChild, // Object_method name
+            OPTIONAL_logical_t, flag,  // Flag
+            CSELF, self)               // GTK self
+{
+    if (argumentExists(1)) {
+        gtk_event_box_set_above_child(GTK_EVENT_BOX(self), flag);
+    }
+    else {
+        return gtk_event_box_get_above_child(GTK_EVENT_BOX(self));
+    }
 
-renderer = .GtkCellRendererText~new()
-column = .GtkTreeViewColumn~newWithAttributes('Buy', renderer, 'text', BUY_IT)
-treeview~append_column(column)
+    return 0;
+}
 
-renderer = .GtkCellRendererText~new()
-column = .GtkTreeViewColumn~newWithAttributes('Count', renderer, 'text', QUANTITY)
-treeview~append_column(column)
+/**
+ * Method:  set/get_visible_window
+ * 
+ * Set/get the visibility of the window.
+ * 
+ * @param flag   Visibility flag.
+ *
+ * @return        Zero.
+ */
+RexxMethod2(logical_t,                 // Return type
+            GrxEventBoxGetSetVisibleWindow, // Object_method name
+            OPTIONAL_logical_t, flag,  // Flag
+            CSELF, self)               // GTK self
+{
+    if (argumentExists(1)) {
+        gtk_event_box_set_visible_window(GTK_EVENT_BOX(self), flag);
+    }
+    else {
+        return gtk_event_box_get_visible_window(GTK_EVENT_BOX(self));
+    }
 
-renderer = .GtkCellRendererText~new()
-column = .GtkTreeViewColumn~newWithAttributes('Product', renderer, 'text', PRODUCT)
-treeview~append_column(column)
-return
+    return 0;
+}
 
-::class GroceryItem
-
-::attribute buy
-::attribute quantity
-::attribute product
-
-::method init
-use strict arg self~buy, self~quantity, self~product
-return
-
-::class myMainWindow subclass GtkWindow
-
-::method signal_destroy
-call gtk_main_quit
-return
-
/rexxgtk/trunk/test4-7.rex to /rexxgtk/trunk/GTKv2/src/grximage.cpp
--- a/rexxgtk/trunk/test4-7.rex
+++ b/rexxgtk/trunk/GTKv2/src/grximage.cpp
@@ -1,4 +1,3 @@
-#!/usr/bin/rexx
 /*----------------------------------------------------------------------------*/
 /*                                                                            */
 /* Copyright (c) 2007-2008 Rexx Language Association. All rights reserved.    */
@@ -40,42 +39,112 @@
 /*----------------------------------------------------------------------------*/
 
 
--- Derived from Listing 4-7
--- Foundations of GTK+ Development
--- by Andrew Krause
-
-call gtk_init
-window = .myMainWindow~new(.gtk~GTK_WINDOW_TOPLEVEL)
-window~set_title('Scales')
-window~signal_connect("destroy")
-window~set_border_width(10)
-window~set_size_request(250, -1)
-
-scale_int = .GtkHScale~newWithRange(0.0, 10.0, 1.0)
-scale_float = .GtkHScale~newWithRange(0.0, 1.0, 0.1)
-
-scale_int~set_digits(0)
-scale_float~set_digits(1)
-
-scale_int~set_value_pos(.gtk~GTK_POS_RIGHT)
-scale_float~set_value_pos(.gtk~GTK_POS_LEFT)
-
-vbox = .GtkVBox~new(.false, 5)
-vbox~pack_start_defaults(scale_int)
-vbox~pack_start_defaults(scale_float)
-
-window~add(vbox)
-window~show_all()
-
-call gtk_main
-return
+/* include the linux headers and our local stuff */
+#include "rexxgtk.h"
 
 
-::requires 'rexxgtk.cls'
+/*----------------------------------------------------------------------------*/
+/* Global variables                                                           */
+/*----------------------------------------------------------------------------*/
 
-::class myMainWindow subclass GtkWindow
 
-::method signal_destroy
-call gtk_main_quit
-return
+/*----------------------------------------------------------------------------*/
+/* Local Definitions                                                          */
+/*----------------------------------------------------------------------------*/
 
+
+/*============================================================================*/
+/* Private Functions                                                          */
+/*============================================================================*/
+
+
+/*============================================================================*/
+/* Public Functions                                                           */
+/*============================================================================*/
+
+/**
+ * Method:  init
+ *
+ * Create an image.
+ *
+ * @return        Zero.
+ **/
+RexxMethod1(int,                       // Return type
+            GrxImageNew,               // Object_method name
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = gtk_image_new();
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  set_from_file
+ *
+ * Set the image from a file.
+ *
+ * @param filename The file path/name
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxImageSetFromFile,       // Object_method name
+            CSTRING, filename,         // File name/path
+            CSELF, self)               // GTK self
+{
+    GdkPixbuf *buf;
+
+    buf = gdk_pixbuf_new_from_file(filename, NULL);
+    gtk_image_set_from_pixbuf(GTK_IMAGE(self), buf);
+
+    return 0;
+}
+
+/**
+ * Method:  set_from_stock
+ *
+ * Set the image from a stock image.
+ *
+ * @param stockname The stock name
+ *
+ * @param size    The icon size
+ *
+ * @return        Zero.
+ **/
+RexxMethod3(int,                       // Return type
+            GrxImageSetFromStock,      // Object_method name
+            CSTRING, stockname,        // Stock name
+            int, size,                 // Icon size type
+            CSELF, self)               // GTK self
+{
+    gtk_image_set_from_stock(GTK_IMAGE(self), stockname, (GtkIconSize)size);
+
+    return 0;
+}
+
+/**
+ * Method:  set_from_icon_name
+ *
+ * Set the image from an icon.
+ *
+ * @param iconname The icon name
+ *
+ * @param size    The icon size
+ *
+ * @return        Zero.
+ **/
+RexxMethod3(int,                       // Return type
+            GrxImageSetFromIconName,   // Object_method name
+            CSTRING, iconname,         // Icon name
+            int, size,                 // Icon size type
+            CSELF, self)               // GTK self
+{
+    gtk_image_set_from_icon_name(GTK_IMAGE(self), iconname, (GtkIconSize)size);
+
+    return 0;
+}
+
/rexxgtk/trunk/test4-9.rex to /rexxgtk/trunk/GTKv2/src/grxadjustment.cpp
--- a/rexxgtk/trunk/test4-9.rex
+++ b/rexxgtk/trunk/GTKv2/src/grxadjustment.cpp
@@ -1,4 +1,3 @@
-#!/usr/bin/rexx
 /*----------------------------------------------------------------------------*/
 /*                                                                            */
 /* Copyright (c) 2007-2008 Rexx Language Association. All rights reserved.    */
@@ -40,51 +39,184 @@
 /*----------------------------------------------------------------------------*/
 
 
--- Derived from Listing 4-9
--- Foundations of GTK+ Development
--- by Andrew Krause
-
-call gtk_init
-window = .myMainWindow~new(.gtk~GTK_WINDOW_TOPLEVEL)
-window~set_title('Color Button')
-window~signal_connect("destroy")
-window~set_border_width(10)
-
-color = '#003366'
-button = .MyButton~newWithColor(color)
-button~set_title('Select a Color')
-
-label = .GtkLabel~new('Look at my color!')
-label~modify_fg(.gtk~GTK_STATE_NORMAL, color)
-
--- save data for the callback
-button~user_data = label
-
-button~signal_connect('color_set')
-
-hbox = .GtkHBox~new(.false, 5)
-hbox~pack_start_defaults(button)
-hbox~pack_start_defaults(label)
-
-window~add(hbox)
-window~show_all()
-
-call gtk_main
-return
-
-
-::requires 'rexxgtk.cls'
-
-::class myMainWindow subclass GtkWindow
-
-::method signal_destroy
-call gtk_main_quit
-return
-
-::class MyButton subclass GtkColorButton
-
-::method signal_color_set
-color = self~get_color()
-self~user_data~modify_fg(.gtk~GTK_STATE_NORMAL, color)
-return
-
+/* include the linux headers and our local stuff */
+#include "rexxgtk.h"
+
+
+/*----------------------------------------------------------------------------*/
+/* Global variables                                                           */
+/*----------------------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------------*/
+/* Local Definitions                                                          */
+/*----------------------------------------------------------------------------*/
+
+
+/*============================================================================*/
+/* Private Functions                                                          */
+/*============================================================================*/
+
+static void signal_func_0(GtkWidget *window,
+                          gpointer data)
+{
+    cbcb *cblock = (cbcb *)data;
+    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
+    RexxThreadContext *context;
+
+    cblock->instance->AttachThread(&context);
+    context->SendMessage0(rxobj, ((cbcb *)data)->signal_name);
+    context->DetachThread();
+    return;
+}
+
+
+/*============================================================================*/
+/* Public Functions                                                           */
+/*============================================================================*/
+
+/**
+ * Method:  init (6 args)
+ *
+ * Create an adjustment.
+ *
+ * @param value   The value
+ *
+ * @param upper   The upper limit
+ *
+ * @param lower   The lower limit
+ *
+ * @param step    The step increment
+ *
+ * @param page    The page increment
+ *
+ * @param pagesz  The page size
+ *
+ * @return        Zero.
+ **/
+RexxMethod7(int,                       // Return type
+            GrxAdjustmentNew,          // Object_method name
+            double, value,             // Value
+            double, upper,             // Upper limit
+            double, lower,             // Lower limit
+            double, step,              // Step increment
+            double, page,              // Page increment
+            double, pagesz,            // Page size
+            OSELF, self)               // Self
+{
+    GtkAdjustment   *adj;
+
+    adj = (GtkAdjustment *)gtk_adjustment_new(value, upper, lower, step,
+                                              page, pagesz);
+
+    // Save ourself
+    context->SetObjectVariable("CSELF", context->NewPointer(adj));
+    g_object_set_data(G_OBJECT(adj), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  init (1 arg)
+ *
+ * Create an adjustment fro an existing widget.
+ *
+ * @param rxptr   The adjustment pointer
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxAdjustmentNewFromPtr,   // Object_method name
+            POINTER, rxptr,            // Widget pointer
+            OSELF, self)               // Self
+{
+    GtkAdjustment *adj = (GtkAdjustment *)rxptr;
+
+    // Save ourself
+    context->SetObjectVariable("CSELF", context->NewPointer(adj));
+    g_object_set_data(G_OBJECT(adj), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  set_value
+ *
+ * Set the current value.
+ *
+ * @param value   The new value
+ *
+ * @return        Zero
+ **/
+RexxMethod2(double,                    // Return type
+            GrxAdjustmentGetSetValue,  // Object_method name
+            OPTIONAL_double, value,    // New value
+            CSELF, self)               // GTK self
+{
+    if (argumentExists(1)) {
+        gtk_adjustment_set_value(GTK_ADJUSTMENT(self), value);
+    }
+    else {
+        return gtk_adjustment_get_value(GTK_ADJUSTMENT(self));
+    }
+
+    return 0.0;
+}
+
+/**
+ * Method:  clamp_page
+ *
+ * Clamp the page.
+ *
+ * @param lower   The lower limit
+ *
+ * @param upper   The upper limit
+ *
+ * @return        Zero
+ **/
+RexxMethod3(int,                       // Return type
+            GrxAdjustmentClampPage,    // Object_method name
+            double, lower,             // Lower limit
+            double, upper,             // Upper limit
+            CSELF, self)               // GTK self
+{
+    gtk_adjustment_clamp_page(GTK_ADJUSTMENT(self), lower, upper);
+
+    return 0;
+}
+
+/**
+ * Method:  signal_connect
+ *
+ * Connect a signal to an ooRexx method.
+ *
+ * @param name    The signal name
+ *
+ * @return        Zero
+ **/
+RexxMethod2(RexxObjectPtr,             // Return type
+            GrxAdjustmentSignalConnect, // Object_method name
+            CSTRING, name,             // Signal name
+            CSELF, self)               // GTK self
+{
+    cbcb *cblock;
+
+    if (strcmp(name, "changed") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_changed";
+        g_signal_connect(G_OBJECT(self), "changed",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "value_changed") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_value_changed";
+        g_signal_connect(G_OBJECT(self), "value-changed",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    return context->False();
+}
+
/rexxgtk/trunk/test8-7.rex to /rexxgtk/trunk/GTKv2/src/grxmenuitem.cpp
--- a/rexxgtk/trunk/test8-7.rex
+++ b/rexxgtk/trunk/GTKv2/src/grxmenuitem.cpp
@@ -1,4 +1,3 @@
-#!/usr/bin/rexx
 /*----------------------------------------------------------------------------*/
 /*                                                                            */
 /* Copyright (c) 2007-2008 Rexx Language Association. All rights reserved.    */
@@ -40,267 +39,318 @@
 /*----------------------------------------------------------------------------*/
 
 
--- Derived from Listing 8-7
--- Foundations of GTK+ Development
--- by Andrew Krause
-
-call gtk_init
-BUY_IT = 0
-QUANTITY = 1
-PRODUCT = 2
-COLUMNS = 3
-
-PRODUCT_CATEGORY = 0
-PRODUCT_CHILD = 1
-
-list = .array~new(1)
-list[1] = .GroceryItem~new(PRODUCT_CATEGORY, .true, 0, 'Cleaning Supplies')
-list[2] = .GroceryItem~new(PRODUCT_CHILD, .true, 1, 'Paper Towels')
-list[3] = .GroceryItem~new(PRODUCT_CHILD, .true, 3, 'Toilet Paper')
-list[4] = .GroceryItem~new(PRODUCT_CATEGORY, .true, 0, 'Food')
-list[5] = .GroceryItem~new(PRODUCT_CHILD, .true, 2, 'Bread')
-list[6] = .GroceryItem~new(PRODUCT_CHILD, .false, 1, 'Butter')
-list[7] = .GroceryItem~new(PRODUCT_CHILD, .true, 1, 'Milk')
-list[8] = .GroceryItem~new(PRODUCT_CHILD, .false, 3, 'Chips')
-list[9] = .GroceryItem~new(PRODUCT_CHILD, .true, 4, 'Soda')
-
-window = .myMainWindow~new(.gtk~GTK_WINDOW_TOPLEVEL)
-window~set_title('Grocery List')
-window~signal_connect('destroy')
-window~set_border_width(10)
-window~set_size_request(275, 300)
-
-treeview = .GtkTreeview~new()
-call setup_tree_view treeview, BUY_IT, QUANTITY, PRODUCT
-
-store = .GtkTreeStore~new(.gtk~G_TYPE_BOOLEAN, .gtk~G_TYPE_INT, .gtk~G_TYPE_STRING)
-
-do i = 1 to list~items
-   if list[i]~product_type = PRODUCT_CATEGORY then do
-      j = i + 1
-      do while list[j]~product_type <> PRODUCT_CATEGORY
-         if list[j]~buy then do
-            list[i]~quantity += list[j]~quantity
-            end
-         j += 1
-         if j > list~items then leave
-         end
-      iter = store~append()
-      store~set_value(iter, BUY_IT, list[i]~buy, QUANTITY, list[i]~quantity,,
-                      PRODUCT, list[i]~product)
-      end
-   else do
-      child = store~append(iter)
-      store~set_value(child, BUY_IT, list[i]~buy, QUANTITY, list[i]~quantity,,
-                      PRODUCT, list[i]~product)
-      end
-   end
-
-treeview~set_model(store)
-treeview~expand_all()
-
-scrolled_win = .GtkScrolledWindow~new(.nil, .nil)
-scrolled_win~set_policy(.gtk~GTK_POLICY_AUTOMATIC, .gtk~GTK_POLICY_AUTOMATIC)
-
-selection = treeview~get_selection()
-selection~set_mode(.gtk~GTK_SELECTION_MULTIPLE)
-
-scrolled_win~add(treeview)
-scrolled_win~set_policy(.gtk~GTK_POLICY_AUTOMATIC, .gtk~GTK_POLICY_AUTOMATIC)
-
-add = .MyAddButton~newFromStock(.gtk~GTK_STOCK_ADD)
-remove = .MyRemoveButton~newFromStock(.gtk~GTK_STOCK_REMOVE)
-
-add~user_data = .array~new()
-remove~user_data = .array~new()
-add~user_data[1] = treeview
-add~user_data[2] = list
-add~user_data[3] = PRODUCT_CATEGORY
-add~user_data[4] = BUY_IT
-add~user_data[5] = PRODUCT
-add~user_data[6] = QUANTITY
-add~user_data[7] = store
-remove~user_data[1] = treeview
-remove~user_data[2] = list
-remove~user_data[3] = PRODUCT_CATEGORY
-remove~user_data[4] = BUY_IT
-remove~user_data[5] = PRODUCT
-remove~user_data[6] = QUANTITY
-remove~user_data[7] = store
-
-add~signal_connect('clicked')
-remove~signal_connect('clicked')
-
-hbox = .GtkHBox~new(.true, 5)
-hbox~pack_start(add, .false, .true, 0)
-hbox~pack_start(remove, .false, .true, 0)
-
-vbox = .GtkVBox~new(.false, 5)
-vbox~pack_start(scrolled_win, .true, .true, 0)
-vbox~pack_start(hbox, .false, .true, 0)
-
-window~add(vbox)
-window~show_all()
-
-call gtk_main
-return
-
-::requires 'rexxgtk.cls'
-
-::routine setup_tree_view
-use strict arg treeview, BUY_IT, QUANTITY, PRODUCT
-
-renderer = .GtkCellRendererText~new()
-column = .GtkTreeViewColumn~newWithAttributes('Buy', renderer, 'text', BUY_IT)
-treeview~append_column(column)
-
-renderer = .GtkCellRendererText~new()
-column = .GtkTreeViewColumn~newWithAttributes('Count', renderer, 'text', QUANTITY)
-treeview~append_column(column)
-
-renderer = .GtkCellRendererText~new()
-column = .GtkTreeViewColumn~newWithAttributes('Product', renderer, 'text', PRODUCT)
-treeview~append_column(column)
-return
-
-::class GroceryItem
-
-::attribute product_type
-::attribute buy
-::attribute quantity
-::attribute product
-
-::method init
-use strict arg self~product_type, self~buy, self~quantity, self~product
-return
-
-::class myMainWindow subclass GtkWindow
-
-::method signal_destroy
-call gtk_main_quit
-return
-
-::class MyAddButton subclass GtkButton
-
-::method signal_clicked
-treeview = self~user_data[1]
-list = self~user_data[2]
-PRODUCT_CATEGORY = self~user_data[3]
-BUY_IT = self~user_data[4]
-PRODUCT = self~user_data[5]
-QUANTITY = self~user_data[6]
-store = self~user_data[7]
-
-dialog = .GtkDialog~new('Add a Product', .nil, .gtk~GTK_DIALOG_MODAL,,
-                        .gtk~GTK_STOCK_ADD, .gtk~GTK_RESPONSE_OK,,
-                        .gtk~GTK_STOCK_CANCEL, .gtk~GTK_RESPONSE_CANCEL)
-combobox = .GtkComboBoxText~new()
-entry = .GtkEntry~new();
-spin = .GtkSpinButton~newWithRange(0, 100, 1)
-check = .GtkCheckButton~newWithMnemonic('_Buy the Product')
-spin~set_digits(0)
-
-do prod over list
-   if prod~product_type = PRODUCT_CATEGORY then do
-      combobox~append_text(prod~product)
-      end
-   end
-
-table = .GtkTable~new(4, 2, .false)
-table~set_row_spacings(5)
-table~set_col_spacings(5)
-table~set_border_width(5)
-
-table~attach(.GtkLabel~new('Category:'), 0, 1, 0, 1,,
-             .gtk~GTK_SHRINK + .gtk~GTK_FILL, .gtk~GTK_SHRINK + .gtk~GTK_FILL,,
-             0, 0)
-table~attach(combobox, 1, 2, 0, 1,,
-             .gtk~GTK_EXPAND + .gtk~GTK_FILL, .gtk~GTK_SHRINK + .gtk~GTK_FILL,,
-             0, 0)
-table~attach(.GtkLabel~new('Product:'), 0, 1, 1, 2,,
-             .gtk~GTK_SHRINK + .gtk~GTK_FILL, .gtk~GTK_SHRINK + .gtk~GTK_FILL,,
-             0, 0)
-table~attach(entry, 1, 2, 1, 2,,
-             .gtk~GTK_EXPAND + .gtk~GTK_FILL, .gtk~GTK_SHRINK + .gtk~GTK_FILL,,
-             0, 0)
-table~attach(.GtkLabel~new('Quantity:'), 0, 1, 2, 3,,
-             .gtk~GTK_SHRINK + .gtk~GTK_FILL, .gtk~GTK_SHRINK + .gtk~GTK_FILL,,
-             0, 0)
-table~attach(spin, 1, 2, 2, 3,,
-             .gtk~GTK_EXPAND + .gtk~GTK_FILL, .gtk~GTK_SHRINK + .gtk~GTK_FILL,,
-             0, 0)
-table~attach(check, 1, 2, 3, 4,,
-             .gtk~GTK_EXPAND + .gtk~GTK_FILL, .gtk~GTK_SHRINK + .gtk~GTK_FILL,,
-             0, 0)
-
-dialog~vbox~pack_start_defaults(table)
-dialog~show_all()
-
-if dialog~dialog_run() = .gtk~GTK_RESPONSE_OK then do
-   quant = spin~get_text()
-   prod = entry~get_text()
-   cat = combobox~get_active_text()
-   buy = check~get_active()
-
-   if prod = '' | cat = '' then do
-      say 'All of the fields were not correctly filled out!'
-      dialog~destroy()
-      return
-      end
-
-   model = treeview~get_model()
-   iter = model~get_iter_from_string('0');
-
-   do while \iter~isNull()
-      name = model~get_value(iter, PRODUCT)
-      if name = cat then leave
-      iter = model~iter_next(iter)
-      end
-
-   path = model~get_path(iter)
-   child = store~append(iter)
-   store~set_value(child, BUY_IT, buy, QUANTITY, quant, PRODUCT, prod)
-
-   if buy = .true then do
-      path = model~get_path(iter)
-      i = model~get_value(iter, QUANTITY)
-      i += quant
-      store~set_value(iter, QUANTITY, i)
-      end
-   end
-
-dialog~destroy()
-return
-
-::class MyRemoveButton subclass GtkButton
-
-::method signal_clicked
-treeview = self~user_data[1]
-list = self~user_data[2]
-PRODUCT_CATEGORY = self~user_data[3]
-BUY_IT = self~user_data[4]
-PRODUCT = self~user_data[5]
-QUANTITY = self~user_data[6]
-store = self~user_data[7]
-
-selection = treeview~get_selection()
-model = treeview~get_model()
-rows = selection~get_selected_rows(model)
-do row over rows
-   -- remove each row
-   path = row~get_path()
-   iter = model~get_iter(path)
-   if model~has_parent(iter) then do
-      buy = model~get_value(iter, BUY_IT)
-      quant = model~get_value(iter, QUANTITY)
-      parent = model~get_parent(iter)
-      num = model~get_value(parent, QUANTITY)
-      if buy then do
-         num = num - quant
-         store~set_value(parent, QUANTITY, num)
-         end
-      store~remove(iter);
-      end
-   end
-return
-
+/* include the linux headers and our local stuff */
+#include "rexxgtk.h"
+
+
+/*----------------------------------------------------------------------------*/
+/* Global variables                                                           */
+/*----------------------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------------*/
+/* Local Definitions                                                          */
+/*----------------------------------------------------------------------------*/
+
+
+/*============================================================================*/
+/* Private Functions                                                          */
+/*============================================================================*/
+
+static void signal_func_0(GtkWidget *window,
+                          gpointer data)
+{
+    cbcb *cblock = (cbcb *)data;
+    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
+    RexxThreadContext *context;
+
+    cblock->instance->AttachThread(&context);
+    context->SendMessage0(rxobj, ((cbcb *)data)->signal_name);
+    context->DetachThread();
+    return;
+}
+
+static void signal_func_1(GtkWidget *window,
+                          gint arg1,
+                          gpointer data)
+{
+    cbcb *cblock = (cbcb *)data;
+    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
+    RexxThreadContext *context;
+
+    cblock->instance->AttachThread(&context);
+    RexxObjectPtr arg1type = context->WholeNumberToObject((wholenumber_t)arg1);;
+    context->SendMessage1(rxobj, ((cbcb *)data)->signal_name, arg1type);
+    context->DetachThread();
+    return;
+}
+
+
+/*============================================================================*/
+/* Public Functions                                                           */
+/*============================================================================*/
+
+/**
+ * Method:  init
+ *
+ * Create a menu item.
+ *
+ * @return        Zero.
+ **/
+RexxMethod3(int,                       // Return type
+            GrxMenuItemNew,            // Object_method name
+            OPTIONAL_CSTRING, label,   // Menu label
+            OPTIONAL_logical_t, mflag, // Mnemonic flag
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget;
+
+    if (label == NULL) {
+        myWidget = gtk_menu_item_new();
+    }
+    else {
+        if (mflag) {
+            myWidget = gtk_menu_item_new_with_mnemonic(label);
+        }
+        else {
+            myWidget = gtk_menu_item_new_with_label(label);
+        }
+    }
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  set/get_right_justified
+ *
+ * Set/get the right justification flag.
+ *
+ * @param state   The right justification state
+ *
+ * @return        Zero
+ **/
+RexxMethod2(logical_t,                 // Return type
+            GrxMenuItemGetSetRightJustified, // Object_method name
+            OPTIONAL_logical_t, state, // The state boolean
+            CSELF, self)               // GTK self
+{
+    if (argumentExists(1)) {
+        gtk_menu_item_set_right_justified(GTK_MENU_ITEM(self), state);
+    }
+    else {
+        return gtk_menu_item_get_right_justified(GTK_MENU_ITEM(self));
+    }
+
+    return 0;
+}
+
+/**
+ * Method:  set_submenu
+ *
+ * Set a submenu.
+ *
+ * @param subm    The submenu
+ *
+ * @return        Zero
+ **/
+RexxMethod2(int,                       // Return type
+            GrxMenuItemSetSubmenu,     // Object_method name
+            RexxObjectPtr, subm,       // The submenu
+            CSELF, self)               // GTK self
+{
+    if (!context->IsOfType(subm, "GtkWidget")) {
+        context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                 context->WholeNumberToObject(1),
+                                 context->NewStringFromAsciiz("GtkWidget"));
+        return 0;
+    }
+    GtkWidget *subWidget = (GtkWidget *)context->ObjectToCSelf(subm);
+
+    gtk_menu_item_set_submenu(GTK_MENU_ITEM(self), subWidget);
+
+    return 0;
+}
+
+/**
+ * Method:  remove_submenu
+ *
+ * Remove a submenu.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(int,                       // Return type
+            GrxMenuItemRemoveSubmenu,  // Object_method name
+            CSELF, self)               // GTK self
+{
+    gtk_menu_item_remove_submenu(GTK_MENU_ITEM(self));
+
+    return 0;
+}
+
+/**
+ * Method:  set_accel_path
+ *
+ * Set the accelerator path.
+ *
+ * @param path    The accel path
+ *
+ * @return        Zero
+ **/
+RexxMethod2(int,                       // Return type
+            GrxMenuItemSetAccelPath,   // Object_method name
+            CSTRING, path,             // The accel path
+            CSELF, self)               // GTK self
+{
+    gtk_menu_item_set_accel_path(GTK_MENU_ITEM(self), path);
+
+    return 0;
+}
+
+/**
+ * Method:  select
+ *
+ * Select the menu item.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(int,                       // Return type
+            GrxMenuItemSelect,         // Object_method name
+            CSELF, self)               // GTK self
+{
+    gtk_menu_item_select(GTK_MENU_ITEM(self));
+
+    return 0;
+}
+
+/**
+ * Method:  deselect
+ *
+ * Deselect the menu item.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(int,                       // Return type
+            GrxMenuItemDeselect,       // Object_method name
+            CSELF, self)               // GTK self
+{
+    gtk_menu_item_deselect(GTK_MENU_ITEM(self));
+
+    return 0;
+}
+
+/**
+ * Method:  signal_connect
+ *
+ * Connect a signal to an ooRexx method.
+ *
+ * @param name    The signal name
+ *
+ * @return        Zero
+ **/
+RexxMethod3(RexxObjectPtr,             // Return type
+            GrxMenuItemSignalConnect,  // Object_method name
+            CSTRING, name,             // Signal name
+            SUPER, super,              // The superclass override
+            CSELF, self)               // GTK self
+{
+    cbcb *cblock;
+
+    if (strcmp(name, "activate") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_activate";
+        g_signal_connect(G_OBJECT(self), "activate",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "activate_item") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_activate_item";
+        g_signal_connect(G_OBJECT(self), "activate-item",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "toggle_size_allocate") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_toggle_size_allocate";
+        g_signal_connect(G_OBJECT(self), "toggle-size-allocate",
+                         G_CALLBACK(signal_func_1), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "toggle_size_request") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_toggle_size_request";
+        g_signal_connect(G_OBJECT(self), "toggle-size-request",
+                         G_CALLBACK(signal_func_1), cblock);
+        return context->True();
+    }
+    return context->ForwardMessage(NULLOBJECT, NULL, super, NULLOBJECT);
+}
+
+/**
+ * Method:  init
+ *
+ * Create a seperator menu item.
+ *
+ * @return        Zero.
+ **/
+RexxMethod1(int,                       // Return type
+            GrxSeparatorMenuItemNew,   // Object_method name
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = gtk_separator_menu_item_new();
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  init
+ *
+ * Create a menu item.
+ *
+ * @return        Zero.
+ **/
+RexxMethod4(int,                       // Return type
+            GrxImageMenuItemNew,       // Object_method name
+            CSTRING, label,            // Menu label
+            OPTIONAL_int, flag,        // Menu flag
+            OPTIONAL_RexxObjectPtr, accelgrp,
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget;
+
+    if (flag == 0) {
+        myWidget = gtk_image_menu_item_new_with_label(label);
+    }
+    else if (flag == 1) {
+        myWidget = gtk_image_menu_item_new_with_mnemonic(label);
+    }
+    else {
+        if (!context->IsOfType(accelgrp, "GtkAccelGroup")) {
+            context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                     context->WholeNumberToObject(1),
+                                     context->NewStringFromAsciiz("GtkAccelGroup"));
+            return 0;
+        }
+        GtkAccelGroup *accelgrpWidget = (GtkAccelGroup *)context->ObjectToCSelf(accelgrp);
+        myWidget = gtk_image_menu_item_new_from_stock(label, accelgrpWidget);
+    }
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
+
+    return 0;
+}
+
/rexxgtk/trunk/test5-10.rex to /rexxgtk/trunk/GTKv2/src/grxcombobox.cpp
--- a/rexxgtk/trunk/test5-10.rex
+++ b/rexxgtk/trunk/GTKv2/src/grxcombobox.cpp
@@ -1,4 +1,3 @@
-#!/usr/bin/rexx
 /*----------------------------------------------------------------------------*/
 /*                                                                            */
 /* Copyright (c) 2007-2008 Rexx Language Association. All rights reserved.    */
@@ -40,41 +39,208 @@
 /*----------------------------------------------------------------------------*/
 
 
--- Derived from Listing 5-10
--- Foundations of GTK+ Development
--- by Andrew Krause
-
-call gtk_init
-dialog = .myFontDialog~new('Choose a Font')
-dialog~set_font_name('Sans Bold Italic 12')
-dialog~set_preview_text('Foundations of GTK+ Development')
-dialog~signal_connect('response')
-
-dialog~show_all()
-
-call gtk_main
-return
-
-
-::requires 'rexxgtk.cls'
-
-::class myFontDialog subclass GtkFontSelectionDialog
-
-::method signal_response
-use strict arg response
-select
-   when response = .gtk~GTK_RESPONSE_APPLY | response = .gtk~GTK_RESPONSE_OK then do
-      font = self~get_font_name()
-      message = .GtkMessageDialog~new(.nil, .gtk~GTK_DIALOG_MODAL,,
-                                      .gtk~GTK_MESSAGE_INFO,,
-                                      .gtk~GTK_BUTTONS_OK, font)
-      message~dialog_run()
-      message~destroy()
-      end
-   otherwise do
-      self~destroy()
-      call gtk_main_quit
-      end
-   end
-return
-
+/* include the linux headers and our local stuff */
+#include "rexxgtk.h"
+
+
+/*----------------------------------------------------------------------------*/
+/* Global variables                                                           */
+/*----------------------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------------*/
+/* Local Definitions                                                          */
+/*----------------------------------------------------------------------------*/
+
+
+/*============================================================================*/
+/* Private Functions                                                          */
+/*============================================================================*/
+
+static void signal_func_0(GtkWidget *window,
+                          gpointer data)
+{
+    cbcb *cblock = (cbcb *)data;
+    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
+    RexxThreadContext *context;
+
+    cblock->instance->AttachThread(&context);
+    context->SendMessage0(rxobj, ((cbcb *)data)->signal_name);
+    context->DetachThread();
+    return;
+}
+
+
+static void signal_func_1(GtkWidget *window,
+                          GtkScrollType arg1,
+                          gpointer data)
+{
+    cbcb *cblock = (cbcb *)data;
+    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
+    RexxThreadContext *context;
+
+    cblock->instance->AttachThread(&context);
+    RexxObjectPtr scrolltype = context->WholeNumberToObject((wholenumber_t)arg1);
+    context->SendMessage1(rxobj, ((cbcb *)data)->signal_name, scrolltype);
+    context->DetachThread();
+    return;
+}
+
+
+/*============================================================================*/
+/* Public Functions                                                           */
+/*============================================================================*/
+
+/**
+ * Method:  init
+ *
+ * Create a combobox.
+ *
+ * @return        Zero.
+ **/
+RexxMethod1(int,                       // Return type
+            GrxComboBoxNew,            // Object_method name
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = gtk_combo_box_new();
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
+
+    return 0;
+}
+/**
+ * Method:  init
+ *
+ * Create a combobox.
+ *
+ * @return        Zero.
+ **/
+RexxMethod1(int,                       // Return type
+            GrxComboBoxNewText,        // Object_method name
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = gtk_combo_box_new_text();
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  append_text
+ *
+ * Append text to a combobox.
+ *
+ * @param text    The text to append
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxComboBoxAppendText,     // Object_method name
+            CSTRING, text,             // Text to append
+            CSELF, self)               // GTK self
+{
+    gtk_combo_box_append_text(GTK_COMBO_BOX(self), text);
+
+    return 0;
+}
+
+/**
+ * Method:  get_active_text
+ *
+ * Get the active text.
+ *
+ * @return        Text.
+ **/
+RexxMethod1(RexxObjectPtr,             // Return type
+            GrxComboBoxGetActiveText,  // Object_method name
+            CSELF, self)               // GTK self
+{
+    char *text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(self));
+
+    if (text == NULL) {
+        return context->NewStringFromAsciiz("");
+    }
+    return context->NewStringFromAsciiz(text);
+}
+
+/**
+ * Method:  set/get_active
+ *
+ * Set/get the active entry.
+ *
+ * @param active  The entry to set active.
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxComboBoxGetSetActive,   // Object_method name
+            OPTIONAL_int, active,      // Entry number
+            CSELF, self)               // GTK self
+{
+    if (argumentExists(1)) {
+        gtk_combo_box_set_active(GTK_COMBO_BOX(self), active);
+    }
+    else {
+        return gtk_combo_box_get_active(GTK_COMBO_BOX(self));
+    }
+
+    return 0;
+}
+
+/**
+ * Method:  signal_connect
+ *
+ * Connect a signal to an ooRexx method.
+ *
+ * @param name    The signal name
+ *
+ * @return        Zero
+ **/
+RexxMethod3(RexxObjectPtr,             // Return type
+            GrxComboBoxSignalConnect,  // Object_method name
+            CSTRING, name,             // Image file name
+            SUPER, super,              // The superclass override
+            CSELF, self)               // GTK self
+{
+    cbcb *cblock;
+
+    if (strcmp(name, "changed") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_changed";
+        g_signal_connect(G_OBJECT(self), "changed",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "move_active") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_move_active";
+        g_signal_connect(G_OBJECT(self), "move-active",
+                         G_CALLBACK(signal_func_1), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "popdown") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_popdown";
+        g_signal_connect(G_OBJECT(self), "popdown",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "popup") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_popup";
+        g_signal_connect(G_OBJECT(self), "popup",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    return context->ForwardMessage(NULLOBJECT, NULL, super, NULLOBJECT);
+}
+
/rexxgtk/trunk/grxmenuitem.cpp to /rexxgtk/trunk/GTKv2/src/grxtoolbutton.cpp
--- a/rexxgtk/trunk/grxmenuitem.cpp
+++ b/rexxgtk/trunk/GTKv2/src/grxtoolbutton.cpp
@@ -57,11 +57,11 @@
 /* Private Functions                                                          */
 /*============================================================================*/
 
-static void signal_func_0(GtkWidget *window,
+static void signal_func_0(GtkWidget *toolitem,
                           gpointer data)
 {
     cbcb *cblock = (cbcb *)data;
-    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
+    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(toolitem), "OORXOBJECT");
     RexxThreadContext *context;
 
     cblock->instance->AttachThread(&context);
@@ -70,21 +70,6 @@
     return;
 }
 
-static void signal_func_1(GtkWidget *window,
-                          gint arg1,
-                          gpointer data)
-{
-    cbcb *cblock = (cbcb *)data;
-    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
-    RexxThreadContext *context;
-
-    cblock->instance->AttachThread(&context);
-    RexxObjectPtr arg1type = context->WholeNumberToObject((wholenumber_t)arg1);;
-    context->SendMessage1(rxobj, ((cbcb *)data)->signal_name, arg1type);
-    context->DetachThread();
-    return;
-}
-
 
 /*============================================================================*/
 /* Public Functions                                                           */
@@ -93,264 +78,310 @@
 /**
  * Method:  init
  *
- * Create a menu item.
+ * Create an tool button.
+ *
+ * @param icon    The button icon
+ *
+ * @param label   The button label
  *
  * @return        Zero.
  **/
 RexxMethod3(int,                       // Return type
-            GrxMenuItemNew,            // Object_method name
-            OPTIONAL_CSTRING, label,   // Menu label
-            OPTIONAL_logical_t, mflag, // Mnemonic flag
+            GrxToolButtonNew,          // Object_method name
+            RexxObjectPtr, icon,       // Icon widget
+            CSTRING, label,            // Button label text
             OSELF, self)               // Self
 {
-    GtkWidget *myWidget;
-
-    if (label == NULL) {
-        myWidget = gtk_menu_item_new();
-    }
-    else {
-        if (mflag) {
-            myWidget = gtk_menu_item_new_with_mnemonic(label);
-        }
-        else {
-            myWidget = gtk_menu_item_new_with_label(label);
-        }
-    }
-
-    // Save ourself
-    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
-    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
-
-    return 0;
-}
-
-/**
- * Method:  set/get_right_justified
- *
- * Set/get the right justification flag.
- *
- * @param state   The right justification state
- *
- * @return        Zero
- **/
-RexxMethod2(logical_t,                 // Return type
-            GrxMenuItemGetSetRightJustified, // Object_method name
-            OPTIONAL_logical_t, state, // The state boolean
-            CSELF, self)               // GTK self
-{
-    if (argumentExists(1)) {
-        gtk_menu_item_set_right_justified(GTK_MENU_ITEM(self), state);
-    }
-    else {
-        return gtk_menu_item_get_right_justified(GTK_MENU_ITEM(self));
-    }
-
-    return 0;
-}
-
-/**
- * Method:  set_submenu
- *
- * Set a submenu.
- *
- * @param subm    The submenu
- *
- * @return        Zero
- **/
-RexxMethod2(int,                       // Return type
-            GrxMenuItemSetSubmenu,     // Object_method name
-            RexxObjectPtr, subm,       // The submenu
-            CSELF, self)               // GTK self
-{
-    if (!context->IsOfType(subm, "GtkWidget")) {
+    if (!context->IsOfType(icon, "GtkWidget")) {
         context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
                                  context->WholeNumberToObject(1),
                                  context->NewStringFromAsciiz("GtkWidget"));
         return 0;
     }
-    GtkWidget *subWidget = (GtkWidget *)context->ObjectToCSelf(subm);
-
-    gtk_menu_item_set_submenu(GTK_MENU_ITEM(self), subWidget);
-
-    return 0;
-}
-
-/**
- * Method:  remove_submenu
- *
- * Remove a submenu.
+    GtkWidget *iconWidget = (GtkWidget *)context->ObjectToCSelf(icon);
+    GtkToolItem *toolitem = gtk_tool_button_new(iconWidget, label);
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(toolitem));
+    g_object_set_data(G_OBJECT(toolitem), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  init
+ *
+ * Create an tool button from stock.
+ *
+ * @param label   The button stock id.
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxToolButtonNewFromStock, // Object_method name
+            CSTRING, sid,              // Button stock id
+            OSELF, self)               // Self
+{
+    GtkToolItem *toolitem = gtk_tool_button_new_from_stock(sid);
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(toolitem));
+    g_object_set_data(G_OBJECT(toolitem), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  set/get_label
+ *
+ * Sets/gets the button label.
+ *
+ * @param label   The button label
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(RexxObjectPtr,             // Return type
+            GrxToolButtonGetSetLabel,  // Object_method name
+            OPTIONAL_CSTRING, label,   // Button label text
+            CSELF, self)               // GTK self
+{
+    RexxObjectPtr retc;
+
+    if (argumentExists(1)) {
+        gtk_tool_button_set_label(GTK_TOOL_BUTTON(self), label);
+        retc = (RexxObjectPtr)context->Nil();
+    }
+    else {
+        retc = (RexxObjectPtr)context->NewStringFromAsciiz(gtk_tool_button_get_label(GTK_TOOL_BUTTON(self)));
+    }
+
+    return retc;
+}
+
+/**
+ * Method:  set_use_underline
+ *
+ * Sets the accelerator key..
+ *
+ * @param flag    The use underline boolean
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxToolButtonSetUseUnderline, // Object_method name
+            logical_t, flag,           // Use underline boolean
+            CSELF, self)               // GTK self
+{
+    gtk_tool_button_set_use_underline(GTK_TOOL_BUTTON(self), flag);
+
+    return 0;
+}
+
+/**
+ * Method:  get_use_underline
+ *
+ * Gets the use underline boolean.
+ *
+ * @return        Flag
+ **/
+RexxMethod1(logical_t,                 // Return type
+            GrxToolButtonGetUseUnderline, // Object_method name
+            CSELF, self)               // GTK self
+{
+    return gtk_tool_button_get_use_underline(GTK_TOOL_BUTTON(self));
+}
+
+/**
+ * Method:  set/get_stock_id
+ *
+ * Sets/gets the stock id.
+ *
+ * @param id      The stock id
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(RexxObjectPtr,             // Return type
+            GrxToolButtonGetSetStockId, // Object_method name
+            OPTIONAL_CSTRING, id,      // The stock id
+            CSELF, self)               // GTK self
+{
+    RexxObjectPtr retc;
+
+    if (argumentExists(1)) {
+        gtk_tool_button_set_stock_id(GTK_TOOL_BUTTON(self), id);
+        retc = (RexxObjectPtr)context->Nil();
+    }
+    else {
+        retc = (RexxObjectPtr)context->NewStringFromAsciiz(gtk_tool_button_get_stock_id(GTK_TOOL_BUTTON(self)));
+    }
+
+    return 0;
+}
+
+/**
+ * Method:  set/get_icon_name
+ *
+ * Sets/gets the icon name.
+ *
+ * @param name    The icon name
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(RexxObjectPtr,             // Return type
+            GrxToolButtonGetSetIconName, // Object_method name
+            OPTIONAL_CSTRING, name,    // The icon name
+            CSELF, self)               // GTK self
+{
+    RexxObjectPtr retc;
+
+    if (argumentExists(1)) {
+        gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(self), name);
+        retc = (RexxObjectPtr)context->Nil();
+    }
+    else {
+        retc = (RexxObjectPtr)context->NewStringFromAsciiz(gtk_tool_button_get_icon_name(GTK_TOOL_BUTTON(self)));
+    }
+
+    return retc;
+}
+
+/**
+ * Method:  set/get_icon_widget
+ *
+ * Sets/gets the icon widget.
+ *
+ * @param name    The icon widget.
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(RexxObjectPtr,             // Return type
+            GrxToolButtonGetSetIconWidget, // Object_method name
+            OPTIONAL_RexxObjectPtr, icon, // The icon widget
+            CSELF, self)               // GTK self
+{
+    RexxObjectPtr retc = (RexxObjectPtr)context->Nil();
+
+    if (argumentExists(1)) {
+        if (!context->IsOfType(icon, "GtkWidget")) {
+            context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                     context->WholeNumberToObject(1),
+                                     context->NewStringFromAsciiz("GtkWidget"));
+            return retc;
+        }
+        GtkWidget *iconWidget = (GtkWidget *)context->ObjectToCSelf(icon);
+        gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(self), iconWidget);
+    }
+    else {
+        GtkWidget *iconWidget = gtk_tool_button_get_icon_widget(GTK_TOOL_BUTTON(self));
+        retc = (RexxObjectPtr)g_object_get_data(G_OBJECT(iconWidget), "OORXOBJECT");
+    }
+
+    return retc;
+}
+
+/**
+ * Method:  set/set_label_widget
+ *
+ * Sets/gets the label widget.
+ *
+ * @param name    The label widget.
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(RexxObjectPtr,             // Return type
+            GrxToolButtonGetSetLabelWidget, // Object_method name
+            OPTIONAL_RexxObjectPtr, label, // The label
+            CSELF, self)               // GTK self
+{
+    RexxObjectPtr retc = (RexxObjectPtr)context->Nil();
+
+    if (argumentExists(1)) {
+        if (!context->IsOfType(label, "GtkWidget")) {
+            context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                     context->WholeNumberToObject(1),
+                                     context->NewStringFromAsciiz("GtkWidget"));
+            return retc;
+        }
+        GtkWidget *labelWidget = (GtkWidget *)context->ObjectToCSelf(label);
+        gtk_tool_button_set_label_widget(GTK_TOOL_BUTTON(self), labelWidget);
+    }
+    else {
+        GtkWidget *labelWidget = gtk_tool_button_get_label_widget(GTK_TOOL_BUTTON(self));
+        retc = (RexxObjectPtr)g_object_get_data(G_OBJECT(labelWidget), "OORXOBJECT");
+    }
+
+    return retc;
+}
+
+/**
+ * Method:  signal_connect
+ *
+ * Connect a signal to an ooRexx method.
+ *
+ * @param name    The signal name
  *
  * @return        Zero
  **/
-RexxMethod1(int,                       // Return type
-            GrxMenuItemRemoveSubmenu,  // Object_method name
-            CSELF, self)               // GTK self
-{
-    gtk_menu_item_remove_submenu(GTK_MENU_ITEM(self));
-
-    return 0;
-}
-
-/**
- * Method:  set_accel_path
- *
- * Set the accelerator path.
- *
- * @param path    The accel path
- *
- * @return        Zero
- **/
-RexxMethod2(int,                       // Return type
-            GrxMenuItemSetAccelPath,   // Object_method name
-            CSTRING, path,             // The accel path
-            CSELF, self)               // GTK self
-{
-    gtk_menu_item_set_accel_path(GTK_MENU_ITEM(self), path);
-
-    return 0;
-}
-
-/**
- * Method:  select
- *
- * Select the menu item.
- *
- * @return        Zero
- **/
-RexxMethod1(int,                       // Return type
-            GrxMenuItemSelect,         // Object_method name
-            CSELF, self)               // GTK self
-{
-    gtk_menu_item_select(GTK_MENU_ITEM(self));
-
-    return 0;
-}
-
-/**
- * Method:  deselect
- *
- * Deselect the menu item.
- *
- * @return        Zero
- **/
-RexxMethod1(int,                       // Return type
-            GrxMenuItemDeselect,       // Object_method name
-            CSELF, self)               // GTK self
-{
-    gtk_menu_item_deselect(GTK_MENU_ITEM(self));
-
-    return 0;
-}
-
-/**
- * Method:  signal_connect
- *
- * Connect a signal to an ooRexx method.
- *
- * @param name    The signal name
- *
- * @return        Zero
- **/
 RexxMethod3(RexxObjectPtr,             // Return type
-            GrxMenuItemSignalConnect,  // Object_method name
+            GrxToolButtonSignalConnect,  // Object_method name
             CSTRING, name,             // Signal name
             SUPER, super,              // The superclass override
             CSELF, self)               // GTK self
 {
     cbcb *cblock;
 
-    if (strcmp(name, "activate") == 0) {
+    if (strcmp(name, "clicked") == 0) {
         cblock = (cbcb *)malloc(sizeof(cbcb));
         cblock->instance = context->threadContext->instance;
-        cblock->signal_name = "signal_activate";
-        g_signal_connect(G_OBJECT(self), "activate",
+        cblock->signal_name = "signal_clicked";
+        g_signal_connect(G_OBJECT(self), "clicked",
                          G_CALLBACK(signal_func_0), cblock);
         return context->True();
     }
-    else if (strcmp(name, "activate_item") == 0) {
-        cblock = (cbcb *)malloc(sizeof(cbcb));
-        cblock->instance = context->threadContext->instance;
-        cblock->signal_name = "signal_activate_item";
-        g_signal_connect(G_OBJECT(self), "activate-item",
-                         G_CALLBACK(signal_func_0), cblock);
-        return context->True();
-    }
-    else if (strcmp(name, "toggle_size_allocate") == 0) {
-        cblock = (cbcb *)malloc(sizeof(cbcb));
-        cblock->instance = context->threadContext->instance;
-        cblock->signal_name = "signal_toggle_size_allocate";
-        g_signal_connect(G_OBJECT(self), "toggle-size-allocate",
-                         G_CALLBACK(signal_func_1), cblock);
-        return context->True();
-    }
-    else if (strcmp(name, "toggle_size_request") == 0) {
-        cblock = (cbcb *)malloc(sizeof(cbcb));
-        cblock->instance = context->threadContext->instance;
-        cblock->signal_name = "signal_toggle_size_request";
-        g_signal_connect(G_OBJECT(self), "toggle-size-request",
-                         G_CALLBACK(signal_func_1), cblock);
-        return context->True();
-    }
     return context->ForwardMessage(NULLOBJECT, NULL, super, NULLOBJECT);
 }
 
 /**
  * Method:  init
  *
- * Create a seperator menu item.
+ * Create an tool button separator.
  *
  * @return        Zero.
  **/
 RexxMethod1(int,                       // Return type
-            GrxSeparatorMenuItemNew,   // Object_method name
+            GrxSeparatorToolItemNew,   // Object_method name
             OSELF, self)               // Self
 {
-    GtkWidget *myWidget = gtk_separator_menu_item_new();
+    GtkToolItem *toolitem = gtk_separator_tool_item_new();
 
     // Save ourself
-    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
-    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
-
-    return 0;
-}
-
-/**
- * Method:  init
- *
- * Create a menu item.
- *
- * @return        Zero.
- **/
-RexxMethod4(int,                       // Return type
-            GrxImageMenuItemNew,       // Object_method name
-            CSTRING, label,            // Menu label
-            OPTIONAL_int, flag,        // Menu flag
-            OPTIONAL_RexxObjectPtr, accelgrp,
-            OSELF, self)               // Self
-{
-    GtkWidget *myWidget;
-
-    if (flag == 0) {
-        myWidget = gtk_image_menu_item_new_with_label(label);
-    }
-    else if (flag == 1) {
-        myWidget = gtk_image_menu_item_new_with_mnemonic(label);
-    }
-    else {
-        if (!context->IsOfType(accelgrp, "GtkAccelGroup")) {
-            context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
-                                     context->WholeNumberToObject(1),
-                                     context->NewStringFromAsciiz("GtkAccelGroup"));
-            return 0;
-        }
-        GtkAccelGroup *accelgrpWidget = (GtkAccelGroup *)context->ObjectToCSelf(accelgrp);
-        myWidget = gtk_image_menu_item_new_from_stock(label, accelgrpWidget);
-    }
-
-    // Save ourself
-    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
-    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
-
-    return 0;
-}
-
+    context->SendMessage1(self, "set_cself", context->NewPointer(toolitem));
+    g_object_set_data(G_OBJECT(toolitem), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  set/get_draw
+ *
+ * Sets/gets the draw flag.
+ *
+ * @param flag    The draw boolean
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(logical_t,                 // Return type
+            GrxSeparatorToolItemGetSetDraw, // Object_method name
+            OPTIONAL_logical_t, flag,  // The draw boolean
+            CSELF, self)               // GTK self
+{
+    if (argumentExists(1)) {
+        gtk_separator_tool_item_set_draw(GTK_SEPARATOR_TOOL_ITEM(self), flag);
+    }
+    else {
+        return gtk_separator_tool_item_get_draw(GTK_SEPARATOR_TOOL_ITEM(self));
+    }
+
+    return 0;
+}
+
/rexxgtk/trunk/grxtable.cpp to /rexxgtk/trunk/GTKv2/src/grxwindow.cpp
--- a/rexxgtk/trunk/grxtable.cpp
+++ b/rexxgtk/trunk/GTKv2/src/grxwindow.cpp
@@ -57,32 +57,54 @@
 /* Private Functions                                                          */
 /*============================================================================*/
 
-
-/*============================================================================*/
-/* Public Functions                                                           */
+static void signal_func_0(GtkWidget *window,
+                          gpointer data)
+{
+    cbcb *cblock = (cbcb *)data;
+    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
+    RexxThreadContext *context;
+
+    cblock->instance->AttachThread(&context);
+    context->SendMessage0(rxobj, ((cbcb *)data)->signal_name);
+    context->DetachThread();
+    return;
+}
+
+static void signal_func_1(GtkWidget *window,
+                          GtkWidget *widget,
+                          gpointer data)
+{
+    cbcb *cblock = (cbcb *)data;
+    RexxObjectPtr rxobj = (RexxObjectPtr)g_object_get_data(G_OBJECT(window), "OORXOBJECT");
+    RexxObjectPtr rxwidget = (RexxObjectPtr)g_object_get_data(G_OBJECT(widget), "OORXOBJECT");
+    RexxThreadContext *context;
+
+    cblock->instance->AttachThread(&context);
+    context->SendMessage1(rxobj, ((cbcb *)data)->signal_name, rxwidget);
+    context->DetachThread();
+    return;
+}
+
+
+/*============================================================================*/
+/* Public Methods                                                             */
 /*============================================================================*/
 
 /**
  * Method:  init
  *
- * Create a table.
- *
- * @param rows    Table rows
- *
- * @param cols    Table columns
- *
- * @param homog   Table homegeneous boolean
- *
- * @return        Zero.
- **/
-RexxMethod4(int,                       // Return type
-            GrxTableNew,               // Object_method name
-            int, rows,                 // Table rows
-            int, cols,                 // Table columns
-            logical_t, homogeneous,    // Homogeneous boolean
+ * Create a new Window.
+ *
+ * @param type    The window type.
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxWindowNew,              // Object_method name
+            int, type,                 // Window type
             OSELF, self)               // Self
 {
-    GtkWidget *myWidget = gtk_table_new(rows, cols, homogeneous);
+    GtkWidget *myWidget = gtk_window_new((GtkWindowType)type);
 
     // Save ourself
     context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
@@ -92,93 +114,151 @@
 }
 
 /**
- * Method:  attach
- *
- * Attach a widget to a table.
- *
- * @param rxwidget Widget to be added
- *
- * @param left    Left position
- *
- * @param right   Right position
- *
- * @param top     Top position
- *
- * @param bottom  Bottom position
- *
- * @param xopt    X options
- *
- * @param yopt    Y optiions
- *
- * @param xpad    X padding
- *
- * @param ypad    Y padding
- *
- * @return        Zero.
- **/
-RexxMethod10(int,                       // Return type
-            GrxTableAttach,            // Object_method name
-            RexxObjectPtr, rxWidget,   // Widget to be added
-            int, left,                 // Left position
-            int, right,                // Right position
-            int, top,                  // Top position
-            int, bottom,               // Bottom position
-            int, xoptions,             // X options        
-            int, yoptions,             // Y options
-            int, xpad,                 // X padding
-            int, ypad,                 // Y padding
-            CSELF, self)               // GTK self
-{
-    if (!context->IsOfType(rxWidget, "GtkWidget")) {
+ * Method:  get_title
+ *
+ * Get the title for a window.
+ *
+ * @return        Title string
+ **/
+RexxMethod1(RexxObjectPtr,             // Return type
+            GrxWindowGetTitle,         // Object_method name
+            CSELF, self)               // GTK self
+{
+    const char * retc = gtk_window_get_title(GTK_WINDOW(self));
+    if (retc == NULL) {
+        return (RexxObjectPtr)context->NewStringFromAsciiz("\0");
+    }
+    return (RexxObjectPtr)context->NewStringFromAsciiz(retc);
+}
+
+/**
+ * Method:  set_title
+ *
+ * Set the title for a window.
+ *
+ * @param title   The window title string.
+ *
+ * @return        Zero
+ **/
+RexxMethod2(int,                       // Return type
+            GrxWindowSetTitle,         // Object_method name
+            CSTRING, title,            // Window title
+            CSELF, self)               // GTK self
+{
+    gtk_window_set_title(GTK_WINDOW(self), title);
+
+    return 0;
+}
+
+/**
+ * Method:  set_modal
+ *
+ * Set the modal flag for the window.
+ *
+ * @param modal   The modal flag
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxWindowSetModal,         // Object_method name
+            logical_t, modal,          // Window modal flag
+            CSELF, self)               // GTK self
+{
+    gtk_window_set_modal(GTK_WINDOW(self), modal);
+
+    return 0;
+}
+
+/**
+ * Method:  get_modal
+ *
+ * Get the modal flag for the window.
+ *
+ * @return        Modal boolean
+ **/
+RexxMethod1(logical_t,                 // Return type
+            GrxWindowGetModal,         // Object_method name
+            CSELF, self)               // GTK self
+{
+    return gtk_window_get_modal(GTK_WINDOW(self));
+}
+
+/**
+ * Method:  add_accel_group
+ *
+ * Add an accelerator group to the window,
+ *
+ * @param group   The accel group.
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                        // Return type
+            GrxWindowAddAccelGroup,     // Object_method name
+            RexxObjectPtr, accelgrp,    // Accelerator group
+            CSELF, self)               // GTK self
+{
+    if (!context->IsOfType(accelgrp, "GtkAccelGroup")) {
         context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
                                  context->WholeNumberToObject(1),
-                                 context->NewStringFromAsciiz("GtkWidget"));
+                                 context->NewStringFromAsciiz("GtkAccelGroup"));
         return 0;
     }
-    GtkWidget *myWidget = (GtkWidget *)context->ObjectToCSelf(rxWidget);
-
-    gtk_table_attach(GTK_TABLE(self), myWidget, left, right, top, bottom,
-                     (GtkAttachOptions)xoptions, (GtkAttachOptions)yoptions,
-                     xpad, ypad);         
-
-    return 0;
-}
-
-/**
- * Method:  set_row_spacings
- *
- * Set the table row spacing.
- *
- * @param spacing Row spacing
- *
- * @return        Zero.
- **/
-RexxMethod2(int,                       // Return type
-            GrxTableSetRowSpacings,    // Object_method name
-            int, spacing,              // Row spacing
-            CSELF, self)               // GTK self
-{
-    gtk_table_set_row_spacings(GTK_TABLE(self), spacing);
-
-    return 0;
-}
-
-/**
- * Method:  set_col_spacings
- *
- * Set the table column spacing.
- *
- * @param spacing Column spacing
- *
- * @return        Zero.
- **/
-RexxMethod2(int,                       // Return type
-            GrxTableSetColSpacings,    // Object_method name
-            int, spacing,              // Column spacing
-            CSELF, self)               // GTK self
-{
-    gtk_table_set_col_spacings(GTK_TABLE(self), spacing);
-
-    return 0;
-}
-
+    GtkAccelGroup *accelgrpWidget = (GtkAccelGroup *)context->ObjectToCSelf(accelgrp);
+
+    gtk_window_add_accel_group(GTK_WINDOW(self), accelgrpWidget);
+
+    return 0;
+}
+
+/**
+ * Method:  signal_connect
+ *
+ * Connect a signal to an ooRexx method.
+ *
+ * @param name    The signal name
+ *
+ * @return        Zero.
+ **/
+RexxMethod3(RexxObjectPtr,             // Return type
+            GrxWindowSignalConnect,    // Object_method name
+            CSTRING, name,             // Signal name
+            SUPER, super,              // The superclass override
+            CSELF, self)               // GTK self
+{
+    cbcb *cblock;
+
+    if (strcmp(name, "activate_default") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_set_scroll_adjustments";
+        g_signal_connect(G_OBJECT(self), "set-scroll-adjustments",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "activate_focus") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_activate_focus";
+        g_signal_connect(G_OBJECT(self), "activate-focus",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "keys_changed") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_keys_changed";
+        g_signal_connect(G_OBJECT(self), "keys-changed",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "set_focus") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_set_focus";
+        g_signal_connect(G_OBJECT(self), "set-focus",
+                         G_CALLBACK(signal_func_1), cblock);
+        return context->True();
+    }
+    return context->ForwardMessage(NULLOBJECT, NULL, super, NULLOBJECT);
+}
+
/rexxgtk/trunk/grxeventbox.cpp to /rexxgtk/trunk/GTKv2/src/grxglib.cpp
--- a/rexxgtk/trunk/grxeventbox.cpp
+++ b/rexxgtk/trunk/GTKv2/src/grxglib.cpp
@@ -54,79 +54,313 @@
 
 
 /*============================================================================*/
-/* Private Functions                                                          */
+/* Public Methods                                                             */
 /*============================================================================*/
 
-
-/*============================================================================*/
-/* Public Functions                                                           */
-/*============================================================================*/
-
-/**
- * Method:  init
- *
- * Create an event box.
- *
- * @return        Zero.
+/**
+ * Method: GrxGSListNew
+ *
+ * Create a new GSList.
+ *
+ * @return        Zero
+ **/
+RexxMethod2(int,                       // Return type
+            GrxGSListNew,              // Routine name
+            OPTIONAL_POINTER, ptr,     // List head
+            OSELF, self)               // Self
+{
+
+    if (ptr == NULL) {
+        context->SetObjectVariable("CSELF", context->NewPointer(NULL));
+    }
+    else {
+        GSList * head = (GSList *)ptr;
+        context->SetObjectVariable("CSELF", context->NewPointer(head));
+    }
+    return 0;
+}
+
+/**
+ * Method: GrxGSListUninit
+ *
+ * Destroy a new GSList.
+ *
+ * @return        Zero
  **/
 RexxMethod1(int,                       // Return type
-            GrxEventBoxNew,            // Object_method name
+            GrxGSListUninit,           // Routine name
+            CSELF, self)               // GTK self
+{
+    g_slist_free((GSList *)self);
+
+    return 0;
+}
+
+/**
+ * Method: GrxGSListAppend
+ *
+ * Append an item to the list.
+ *
+ * @param item    The item string
+ *
+ * @return        Zero
+ **/
+RexxMethod2(int,                       // Return type
+            GrxGSListAppend,           // Routine name
+            CSTRING, item,             // Item to append
+            CSELF, self)               // GTK self
+{
+    GSList *head = g_slist_append((GSList *)self, (void *)item);
+    context->SetObjectVariable("CSELF", context->NewPointer(head));
+
+    return 0;
+}
+
+/**
+ * Method: GrxGSListPrepend
+ *
+ * prepend an item to the list.
+ *
+ * @param item    The item string
+ *
+ * @return        Zero
+ **/
+RexxMethod2(int,                       // Return type
+            GrxGSListPrepend,          // Routine name
+            CSTRING, item,             // Item to append
+            CSELF, self)               // GTK self
+{
+    GSList *head = g_slist_prepend((GSList *)self, (void *)item);
+    context->SetObjectVariable("CSELF", context->NewPointer(head));
+
+    return 0;
+}
+
+/**
+ * Method: GrxGSListInsert
+ *
+ * Insert an item to the list.
+ *
+ * @param item    The item string
+ *
+ * @param pos     The position (1-based)
+ *
+ * @return        Zero
+ **/
+RexxMethod3(int,                       // Return type
+            GrxGSListInsert,           // Routine name
+            CSTRING, item,             // Item to append
+            int, pos,                  // Position
+            CSELF, self)               // GTK self
+{
+    GSList *head = g_slist_insert((GSList *)self, (void *)item, pos - 1);
+    context->SetObjectVariable("CSELF", context->NewPointer(head));
+
+    return 0;
+}
+
+/**
+ * Method: GrxGSListItem
+ *
+ * Get the list item.
+ *
+ * @param item    Pointer to the item
+ *
+ * @return        Zero
+ **/
+RexxMethod1(RexxObjectPtr,             // Return type
+            GrxGSListItem,             // Routine name
+            POINTER, rxptr)            // Pointer to the item
+{
+    GSList *item = (GSList *)rxptr;
+
+    return context->NewStringFromAsciiz((char *)item->data);
+}
+
+/**
+ * Method: GrxGSListFirst
+ *
+ * Get the first list item.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(POINTER,                   // Return type
+            GrxGSListFirst,            // Routine name
+            CSELF, self)               // GTK self
+{
+    if (self == NULL) {
+        return context->Nil();
+    }
+    return self;
+}
+
+/**
+ * Method: GrxGSListNext
+ *
+ * Get the next list item.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(POINTER,                   // Return type
+            GrxGSListNext,             // Routine name
+            POINTER, rxptr)            // Routine name
+{
+    GSList *item = (GSList *)rxptr;
+
+    if (item->next == NULL) {
+        return context->Nil();
+    }
+    return item->next;
+}
+
+
+/**
+ * Method: GrxGListNew
+ *
+ * Create a new GList.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(int,                       // Return type
+            GrxGListNew,               // Routine name
             OSELF, self)               // Self
 {
-    GtkWidget *myWidget = gtk_event_box_new();
-
-    // Save ourself
-    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
-    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
-
-    return 0;
-}
-
-/**
- * Method:  set/get_above_child 
- * 
- * Set/get the z-order position with respect to a child.
- * 
- * @param flag   Z-order flag.
- *
- * @return        Zero.
- */
-RexxMethod2(int,                       // Return type
-            GrxEventBoxGetSetAboveChild, // Object_method name
-            OPTIONAL_logical_t, flag,  // Flag
-            CSELF, self)               // GTK self
-{
-    if (argumentExists(1)) {
-        gtk_event_box_set_above_child(GTK_EVENT_BOX(self), flag);
-    }
-    else {
-        return gtk_event_box_get_above_child(GTK_EVENT_BOX(self));
-    }
-
-    return 0;
-}
-
-/**
- * Method:  set/get_visible_window
- * 
- * Set/get the visibility of the window.
- * 
- * @param flag   Visibility flag.
- *
- * @return        Zero.
- */
-RexxMethod2(logical_t,                 // Return type
-            GrxEventBoxGetSetVisibleWindow, // Object_method name
-            OPTIONAL_logical_t, flag,  // Flag
-            CSELF, self)               // GTK self
-{
-    if (argumentExists(1)) {
-        gtk_event_box_set_visible_window(GTK_EVENT_BOX(self), flag);
-    }
-    else {
-        return gtk_event_box_get_visible_window(GTK_EVENT_BOX(self));
-    }
-
-    return 0;
-}
-
+    context->SetObjectVariable("CSELF", context->NewPointer(NULL));
+
+    return 0;
+}
+
+/**
+ * Method: GrxGListUninit
+ *
+ * Destroy a GList.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(int,                       // Return type
+            GrxGListUninit,            // Routine name
+            CSELF, self)               // GTK self
+{
+    g_list_free((GList *)self);
+
+    return 0;
+}
+
+/**
+ * Method: GrxGListAppend
+ *
+ * Append an item to the list.
+ *
+ * @param item    The item string
+ *
+ * @return        Zero
+ **/
+RexxMethod2(int,                       // Return type
+            GrxGListAppend,            // Routine name
+            CSTRING, item,             // Item to append
+            CSELF, self)               // GTK self
+{
+    GList *head = g_list_append((GList *)self, (void *)item);
+    context->SetObjectVariable("CSELF", context->NewPointer(head));
+
+    return 0;
+}
+
+/**
+ * Method: GrxGListPrepend
+ *
+ * Prepend an item to the list.
+ *
+ * @param item    The item string
+ *
+ * @return        Zero
+ **/
+RexxMethod2(int,                       // Return type
+            GrxGListPrepend,           // Routine name
+            CSTRING, item,             // Item to append
+            CSELF, self)               // GTK self
+{
+    GList *head = g_list_prepend((GList *)self, (void *)item);
+    context->SetObjectVariable("CSELF", context->NewPointer(head));
+
+    return 0;
+}
+
+/**
+ * Method: GrxGListInsert
+ *
+ * Insert an item to the list.
+ *
+ * @param item    The item string
+ *
+ * @param pos     The position (1-based)
+ *
+ * @return        Zero
+ **/
+RexxMethod3(int,                       // Return type
+            GrxGListInsert,            // Routine name
+            CSTRING, item,             // Item to append
+            int, pos,                  // Position
+            CSELF, self)               // GTK self
+{
+    GList *head = g_list_insert((GList *)self, (void *)item, pos - 1);
+    context->SetObjectVariable("CSELF", context->NewPointer(head));
+
+    return 0;
+}
+
+/**
+ * Method: GrxGListItem
+ *
+ * Get the list item.
+ *
+ * @param item    Pointer to the item
+ *
+ * @return        Zero
+ **/
+RexxMethod1(POINTER,                   // Return type
+            GrxGListItem,              // Routine name
+            POINTER, rxptr)            // Pointer to the item
+{
+    GList *item = (GList *)rxptr;
+
+    return item->data;
+}
+
+
+/**
+ * Method: GrxGListFirst
+ *
+ * Get the first list item.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(RexxObjectPtr,             // Return type
+            GrxGListFirst,             // Routine name
+            CSELF, self)               // GTK self
+{
+    if (self == NULL) {
+        return context->Nil();
+    }
+    return (RexxObjectPtr)context->NewPointer(self);
+}
+
+/**
+ * Method: GrxGListNext
+ *
+ * Get the next list item.
+ *
+ * @return        Zero
+ **/
+RexxMethod1(POINTER,                   // Return type
+            GrxGListNext,              // Routine name
+            POINTER, rxptr)            // Routine name
+{
+    GList *item = (GList *)rxptr;
+
+    if (item->next == NULL) {
+        return context->Nil();
+    }
+    return item->next;
+}
+
/rexxgtk/trunk/grxwindow.cpp to /rexxgtk/trunk/GTKv2/src/grxcontainer.cpp
--- a/rexxgtk/trunk/grxwindow.cpp
+++ b/rexxgtk/trunk/GTKv2/src/grxcontainer.cpp
@@ -87,24 +87,172 @@
 
 
 /*============================================================================*/
-/* Public Methods                                                             */
+/* Public Functions                                                           */
 /*============================================================================*/
 
 /**
- * Method:  init
- *
- * Create a new Window.
- *
- * @param type    The window type.
+ * Method:  add
+ *
+ * Add a widget to the container widget.
+ *
+ * @param add     The widget to add.
  *
  * @return        Zero.
  **/
 RexxMethod2(int,                       // Return type
-            GrxWindowNew,              // Object_method name
-            int, type,                 // Window type
-            OSELF, self)               // Self
-{
-    GtkWidget *myWidget = gtk_window_new((GtkWindowType)type);
+            GrxContainerAdd,           // Object_method name
+            RexxObjectPtr, rxadd,      // Object to add
+            CSELF, self)               // GTK self
+{
+    if (!context->IsOfType(rxadd, "GtkWidget")) {
+        context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                 context->WholeNumberToObject(1),
+                                 context->NewStringFromAsciiz("GtkWidget"));
+        return 0;
+    }
+    GtkWidget *addWidget = (GtkWidget *)context->ObjectToCSelf(rxadd);
+
+    gtk_container_add(GTK_CONTAINER(self), addWidget);
+
+    return 0;
+}
+
+/**
+ * Method:  remove
+ *
+ * Remove a widget from the container widget.
+ *
+ * @param remove  The widget to remove.
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxContainerRemove,        // Object_method name
+            RexxObjectPtr, rxrem,      // Object to add
+            CSELF, self)               // GTK self
+{
+    if (!context->IsOfType(rxrem, "GtkWidget")) {
+        context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                 context->WholeNumberToObject(1),
+                                 context->NewStringFromAsciiz("GtkWidget"));
+        return 0;
+    }
+    GtkWidget *remWidget = (GtkWidget *)context->ObjectToCSelf(rxrem);
+
+    gtk_container_remove(GTK_CONTAINER(self), remWidget);
+
+    return 0;
+}
+
+/**
+ * Method:  set_border_width
+ *
+ * Set the border width for the container.
+ *
+ * @param width   The width of the border
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxContainerSetBorderWidth,// Object_method name
+            int, width,                // Border widthd
+            CSELF, self)               // GTK self
+{
+    gtk_container_set_border_width(GTK_CONTAINER(self), width);
+
+    return 0;
+}
+
+/**
+ * Method:  pack_start
+ *
+ * Pack a box.
+ *
+ * @param widget  The widget to pack.
+ *
+ * @param expand  Expand boolean.
+ *
+ * @param fill    Fill boolean.
+ *
+ * @param pad     Padding amount.
+ *
+ * @return        Zero.
+ **/
+RexxMethod5(int,                       // Return type
+            GrxBoxPackStart,           // Object_method name
+            RexxObjectPtr, rxpack,     // Widget to pack
+            logical_t, expand,         // Expand boolean
+            logical_t, fill,           // Fill boolean
+            int, padding,              // Padding amount
+            CSELF, self)               // GTK self
+{
+    if (!context->IsOfType(rxpack, "GtkWidget")) {
+        context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                 context->WholeNumberToObject(1),
+                                 context->NewStringFromAsciiz("GtkWidget"));
+        return 0;
+    }
+    GtkWidget *packWidget = (GtkWidget *)context->ObjectToCSelf(rxpack);
+
+    gtk_box_pack_start(GTK_BOX(self), packWidget, expand, fill, (unsigned int)padding);
+
+    return 0;
+}
+
+/**
+ * Method:  pack_end
+ *
+ * Pack a box.
+ *
+ * @param widget  The widget to pack.
+ *
+ * @param expand  Expand boolean.
+ *
+ * @param fill    Fill boolean.
+ *
+ * @param pad     Padding amount.
+ *
+ * @return        Zero.
+ **/
+RexxMethod5(int,                       // Return type
+            GrxBoxPackEnd,             // Object_method name
+            RexxObjectPtr, rxpack,     // Widget to pack
+            logical_t, expand,         // Expand boolean
+            logical_t, fill,           // Fill boolean
+            int, padding,              // Padding amount
+            CSELF, self)               // GTK self
+{
+    if (!context->IsOfType(rxpack, "GtkWidget")) {
+        context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                 context->WholeNumberToObject(1),
+                                 context->NewStringFromAsciiz("GtkWidget"));
+        return 0;
+    }
+    GtkWidget *packWidget = (GtkWidget *)context->ObjectToCSelf(rxpack);
+
+    gtk_box_pack_end(GTK_BOX(self), packWidget, expand, fill, (unsigned int)padding);
+
+    return 0;
+}
+
+/**
+ * Method:  init (2 args)
+ *
+ * Create a new VBox.
+ *
+ * @param homog   The homogeneous boolean
+ *
+ * @param spacing The spacing amount
+ *
+ * @return        Zero.
+ **/
+RexxMethod3(int,                       // Return type
+            GrxVBoxNew,                // Object_method name
+            logical_t, homogeneous,    // Homogeneous boolean
+            int, spacing,              // Spacing amount
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = gtk_vbox_new(homogeneous, spacing);
 
     // Save ourself
     context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
@@ -114,98 +262,221 @@
 }
 
 /**
- * Method:  get_title
- *
- * Get the title for a window.
- *
- * @return        Title string
- **/
-RexxMethod1(RexxObjectPtr,             // Return type
-            GrxWindowGetTitle,         // Object_method name
-            CSELF, self)               // GTK self
-{
-    const char * retc = gtk_window_get_title(GTK_WINDOW(self));
-    if (retc == NULL) {
-        return (RexxObjectPtr)context->NewStringFromAsciiz("\0");
-    }
-    return (RexxObjectPtr)context->NewStringFromAsciiz(retc);
-}
-
-/**
- * Method:  set_title
- *
- * Set the title for a window.
- *
- * @param title   The window title string.
+ * Method:  init (1 arg)
+ *
+ * Create a new VBox.
+ *
+ * @param rxptr   The vbox widget pointer
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxVBoxNewFromPtr,         // Object_method name
+            POINTER, rxptr,            // Vbox pointer
+            OSELF, self)               // Self
+{
+    GtkVBox *vbox = (GtkVBox *)rxptr;
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(vbox));
+    g_object_set_data(G_OBJECT(vbox), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  init
+ *
+ * Create a new HBox from a pointer.
+ *
+ * @param ptr     The VBox pointer
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxVBoxNewFromPointer,     // Object_method name
+            POINTER, ptr,              // The pointer
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = (GtkWidget *)ptr;
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(ptr), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  init
+ *
+ * Create a new HBox.
+ *
+ * @param homog   The homogeneous boolean
+ *
+ * @param spacing The spacing amount
+ *
+ * @return        Zero.
+ **/
+RexxMethod3(int,                       // Return type
+            GrxHBoxNew,                // Object_method name
+            logical_t, homogeneous,    // Homogeneous boolean
+            int, spacing,              // Spacing amount
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = gtk_hbox_new(homogeneous, spacing);
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  init (1 arg)
+ *
+ * Create a new HBox.
+ *
+ * @param rxptr   The hbox widget pointer
+ *
+ * @return        Zero.
+ **/
+RexxMethod2(int,                       // Return type
+            GrxHBoxNewFromPtr,         // Object_method name
+            POINTER, rxptr,            // Homogeneous boolean
+            OSELF, self)               // Self
+{
+    GtkVBox *hbox = (GtkVBox *)rxptr;
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(hbox));
+    g_object_set_data(G_OBJECT(hbox), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  init
+ *
+ * Create a new Alignment.
+ *
+ * @param xalign  The X alignment
+ *
+ * @param yalign  The x alignment
+ *
+ * @param xscale  The x scale
+ *
+ * @param yscale  The x scale
+ *
+ * @return        Zero.
+ **/
+RexxMethod5(int,                       // Return type
+            GrxAlignmentNew,           // Object_method name
+            float, xalign,             // X alignment
+            float, yalign,             // Y alignment
+            float, xscale,             // Y scale
+            float, yscale,             // Y scale
+            OSELF, self)               // Self
+{
+    GtkWidget *myWidget = gtk_alignment_new(xalign, yalign, xscale, yscale);
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
+
+    return 0;
+}
+
+/**
+ * Method:  signal_connect
+ *
+ * Connect a signal to an ooRexx method.
+ *
+ * @param name    The signal name
  *
  * @return        Zero
  **/
-RexxMethod2(int,                       // Return type
-            GrxWindowSetTitle,         // Object_method name
-            CSTRING, title,            // Window title
-            CSELF, self)               // GTK self
-{
-    gtk_window_set_title(GTK_WINDOW(self), title);
-
-    return 0;
-}
-
-/**
- * Method:  set_modal
- *
- * Set the modal flag for the window.
- *
- * @param modal   The modal flag
- *
- * @return        Zero.
- **/
-RexxMethod2(int,                       // Return type
-            GrxWindowSetModal,         // Object_method name
-            logical_t, modal,          // Window modal flag
-            CSELF, self)               // GTK self
-{
-    gtk_window_set_modal(GTK_WINDOW(self), modal);
-
-    return 0;
-}
-
-/**
- * Method:  get_modal
- *
- * Get the modal flag for the window.
- *
- * @return        Modal boolean
- **/
-RexxMethod1(logical_t,                 // Return type
-            GrxWindowGetModal,         // Object_method name
-            CSELF, self)               // GTK self
-{
-    return gtk_window_get_modal(GTK_WINDOW(self));
-}
-
-/**
- * Method:  add_accel_group
- *
- * Add an accelerator group to the window,
- *
- * @param group   The accel group.
- *
- * @return        Zero.
- **/
-RexxMethod2(int,                        // Return type
-            GrxWindowAddAccelGroup,     // Object_method name
-            RexxObjectPtr, accelgrp,    // Accelerator group
-            CSELF, self)               // GTK self
-{
-    if (!context->IsOfType(accelgrp, "GtkAccelGroup")) {
+RexxMethod3(RexxObjectPtr,             // Return type
+            GrxContainerSignalConnect, // Object_method name
+            CSTRING, name,             // Signal name
+            SUPER, super,              // The superclass override
+            CSELF, self)               // GTK self
+{
+    cbcb *cblock;
+
+    if (strcmp(name, "add") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_add";
+        g_signal_connect(G_OBJECT(self), "add",
+                         G_CALLBACK(signal_func_1), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "check_resize") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_check_resize";
+        g_signal_connect(G_OBJECT(self), "check-resize",
+                         G_CALLBACK(signal_func_0), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "remove") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_remove";
+        g_signal_connect(G_OBJECT(self), "remove",
+                         G_CALLBACK(signal_func_1), cblock);
+        return context->True();
+    }
+    else if (strcmp(name, "set_focus_child") == 0) {
+        cblock = (cbcb *)malloc(sizeof(cbcb));
+        cblock->instance = context->threadContext->instance;
+        cblock->signal_name = "signal_set_focus_child";
+        g_signal_connect(G_OBJECT(self), "set-focus-child",
+                         G_CALLBACK(signal_func_1), cblock);
+        return context->True();
+    }
+    return context->ForwardMessage(NULLOBJECT, NULL, super, NULLOBJECT);
+}
+
+
+/**
+ * Method:  init
+ *
+ * Create a new viewport.
+ *
+ * @param hadj    The horizontal adjustment
+ *
+ * @param vadj    The vertical adjustment
+ *
+ * @return        Zero.
+ **/
+RexxMethod3(int,                       // Return type
+            GrxViewportNew,            // Object_method name
+            RexxObjectPtr, rxhadj,     // Horizontal adjustment object
+            RexxObjectPtr, rxvadj,     // Vertical adjustment object
+            OSELF, self)               // Self
+{
+    if (!context->IsOfType(rxhadj, "GtkAdjustment")) {
         context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
                                  context->WholeNumberToObject(1),
-                                 context->NewStringFromAsciiz("GtkAccelGroup"));
+                                 context->NewStringFromAsciiz("GtkAdjustment"));
         return 0;
     }
-    GtkAccelGroup *accelgrpWidget = (GtkAccelGroup *)context->ObjectToCSelf(accelgrp);
-
-    gtk_window_add_accel_group(GTK_WINDOW(self), accelgrpWidget);
+    GtkAdjustment *hadj = (GtkAdjustment *)context->ObjectToCSelf(rxhadj);
+    if (!context->IsOfType(rxvadj, "GtkAdjustment")) {
+        context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
+                                 context->WholeNumberToObject(2),
+                                 context->NewStringFromAsciiz("GtkAdjustment"));
+        return 0;
+    }
+    GtkAdjustment *vadj = (GtkAdjustment *)context->ObjectToCSelf(rxvadj);
+    GtkWidget *myWidget = gtk_viewport_new(hadj, vadj);
+
+    // Save ourself
+    context->SendMessage1(self, "set_cself", context->NewPointer(myWidget));
+    g_object_set_data(G_OBJECT(myWidget), "OORXOBJECT", self);
 
     return 0;
 }
@@ -217,48 +488,23 @@
  *
  * @param name    The signal name
  *
- * @return        Zero.
+ * @return        Zero
  **/
 RexxMethod3(RexxObjectPtr,             // Return type
-            GrxWindowSignalConnect,    // Object_method name
+            GrxViewportSignalConnect,  // Object_method name
             CSTRING, name,             // Signal name
             SUPER, super,              // The superclass override
             CSELF, self)               // GTK self
 {
     cbcb *cblock;
 
-    if (strcmp(name, "activate_default") == 0) {
+    if (strcmp(name, "set_scroll_adjustments") == 0) {
         cblock = (cbcb *)malloc(sizeof(cbcb));
         cblock->instance = context->threadContext->instance;
         cblock->signal_name = "signal_set_scroll_adjustments";
         g_signal_connect(G_OBJECT(self), "set-scroll-adjustments",
-                         G_CALLBACK(signal_func_0), cblock);
-        return context->True();
-    }
-    else if (strcmp(name, "activate_focus") == 0) {
-        cblock = (cbcb *)malloc(sizeof(cbcb));
-        cblock->instance = context->threadContext->instance;
-        cblock->signal_name = "signal_activate_focus";
-        g_signal_connect(G_OBJECT(self), "activate-focus",
-                         G_CALLBACK(signal_func_0), cblock);
-        return context->True();
-    }
-    else if (strcmp(name, "keys_changed") == 0) {
-        cblock = (cbcb *)malloc(sizeof(cbcb));
-        cblock->instance = context->threadContext->instance;
-        cblock->signal_name = "signal_keys_changed";
-        g_signal_connect(G_OBJECT(self), "keys-changed",
-                         G_CALLBACK(signal_func_0), cblock);
-        return context->True();
-    }
-    else if (strcmp(name, "set_focus") == 0) {
-        cblock = (cbcb *)malloc(sizeof(cbcb));
-        cblock->instance = context->threadContext->instance;
-        cblock->signal_name = "signal_set_focus";
-        g_signal_connect(G_OBJECT(self), "set-focus",
                          G_CALLBACK(signal_func_1), cblock);
         return context->True();
     }
     return context->ForwardMessage(NULLOBJECT, NULL, super, NULLOBJECT);
 }
-
1 2 3 .. 9 > >> (Page 1 of 9)