|
From: <kr_...@us...> - 2003-09-03 17:05:31
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv18644
Added Files:
GroupBox.c
Log Message:
Add GroupBox support for GTK
--- NEW FILE: GroupBox.c ---
#include "GroupBox.h"
#include "Internals.h"
#include "Handlers_stub.h"
static void groupbox_size_allocate_handler(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data)
{
handleContainerReLayout(widget);
};
WindowHandle osCreateGroupBox(WindowHandle form)
{
GtkWidget *page, *groupbox;
groupbox = gtk_frame_new("");
gtk_fixed_put(GTK_FIXED(GTK_BIN(GTK_BIN(form)->child)->child), groupbox, 0, 0);
page = gtk_viewport_new(NULL,NULL);
gtk_container_add(GTK_CONTAINER(groupbox), page);
gtk_container_add(GTK_CONTAINER(page), gtk_fixed_new());
gtk_signal_connect (GTK_OBJECT(groupbox), "size-allocate",
GTK_SIGNAL_FUNC(groupbox_size_allocate_handler),
NULL);
gtk_widget_show_all(groupbox);
return groupbox;
};
void osGetGroupBoxBordersSize(WindowHandle groupbox, int *res)
{
res [0] = 0;
res [1] = 0;
res [2] = 10;
res [3] = 20;
}
char *osGetGroupBoxText(WindowHandle groupbox)
{
return strdup(gtk_frame_get_label(GTK_FRAME(groupbox)));
};
void osSetGroupBoxText(WindowHandle groupbox, char *txt)
{
gtk_frame_set_label(GTK_FRAME(groupbox), txt);
};
|