gtk_container.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include "../ut/ut_umem.h"
#include "../gui/gui_types.h"
#include "../gui/gui_base.h"
#include "../gui_gtk/gtk_base.h"
#include "../gui_gtk/gtk_container.h"

Functions

int GUI_box_paned_siz (MemObj *mo, int siz)
MemObj GUI_box_paned__ (MemObj *box1, MemObj *box2, MemObj *o_par, int mode, int resi, int siz1)
MemObj GUI_toolbar__ (MemObj *o_par)
MemObj GUI_frame__ (MemObj *o_par, char *ltxt, int border)
MemObj GUI_notebook__ (MemObj *o_par, void *funcnam)
MemObj GUI_notebook_add (MemObj *o_ntb, char *title)
int GUI_notebook_get (MemObj *o_ntb)
void GUI_notebook_set (MemObj *o_ntb, int pgNr)
int GUI_notebook_CB (void *ntb, void *nbp, int pgNr, MemObj mo)

Variables

GtkWidget * UI_act_wi

Detailed Description

=====================================================
List_functions_start:

GUI_frame__            frame around widgets

GUI_toolbar__          removable container for widgets

GUI_box_paned__        get 2 boxes with movable separation-line
GUI_box_paned_siz      modify size of primary paned-box

GUI_notebook__         notebook (tabControl, tabPages)
GUI_notebook_add       add a page to a notebook
GUI_notebook_set       activate page
GUI_notebook_get       query active page

GUI_notebook_CB        INTERNAL

List_functions_end:
=====================================================

Function Documentation

int GUI_box_paned_siz ( MemObj *  mo,
int  siz 
)

GUI_box_paned_siz modify size of primary paned-box

MemObj GUI_box_paned__ ( MemObj *  box1,
MemObj *  box2,
MemObj *  o_par,
int  mode,
int  resi,
int  siz1 
)

    GUI_box_paned__          get 2 boxes with movable separation-line
   
    Input:
      o_par      parentBox
      mode       0 = vertical separation-line, returns 2 horizontal boxes
                 1 = horizontal separation-line, returns 2 vertical boxes
      resi       0 = make box1 fixed, box2 resizable
                 1 = make box1 resizable, box2 fixed.
      siz1       size of box1 in pixels
    Output:
      box1
      box2

MemObj GUI_toolbar__ ( MemObj *  o_par  ) 

    GUI_toolbar__            removable container for widgets
      parent and child must be a box.
   
    hide / restore toolbox:   GUI_set_show

MemObj GUI_frame__ ( MemObj *  o_par,
char *  ltxt,
int  border 
)

    draws a frame around 1-n widgets. Parent & child must be a box.
    
      ltxt       no Text: set to NULL
      border     outside frame in pixels
    
    Example:
      w1 = GUI_box_h (&win, 1, 0, 0);
      w2 = GUI_frame__ (&w1, "FrameTitel", 1);
      w3 = GUI_box_h (&w2, 0, 0, 0);
      w_info = GUI_Label_1(&w3, "text", 0);

MemObj GUI_notebook__ ( MemObj *  o_par,
void *  funcnam 
)

    Create a new Notebook.
    Add Pages with GUI_notebook_add.
    funcnam is called when noteBook-pages change; first Page has Nr 0.
    Input:
      o_par      parentBox
      funcnam    callbackfunktion for noteBook-pages changes.
   
    funcnam prototyp:
    int funcnam (MemObj *mo, void **data);
        // data=table of 2 pointers;
        GUI_DATA_EVENT   = TYP_EventEnter
        GUI_DATA_I1      = pageNumber
        GUI_OBJ_TYP(mo)  = TYP_GUI_Notebook;
   
    Example:
      MemObj ntb, box1, box2;
      ntb = GUI_notebook__ (&box, my_Notebook_CB);
      box1 = GUI_notebook_add (&ntb, "Page 1");
      box2 = GUI_notebook_add (&ntb, "Page 2");
      ..
      int my_Notebook_CB (MemObj *mo, void **data) {
        int     iTyp;
        iTyp = GUI_OBJ_TYP (mo);
        if(GUI_DATA_EVENT == TYP_EventEnter) {
          if(iTyp == TYP_GUI_Notebook)
            printf(" page %d selected\n",pgNr);
        }
      }
   
    change page:
      GUI_notebook_set (&ntb, iPagNr);

MemObj GUI_notebook_add ( MemObj *  o_ntb,
char *  title 
)

returns a VBOX in the new Notebook-Page.

int GUI_notebook_get ( MemObj *  o_ntb  ) 

GUI_notebook_get query active page

void GUI_notebook_set ( MemObj *  o_ntb,
int  pgNr 
)

activate notebook-page; first=0, next=1 ..

int GUI_notebook_CB ( void *  ntb,
void *  nbp,
int  pgNr,
MemObj  mo 
)

INTERNAL callback of switch-notebook-page


Variable Documentation

GtkWidget* UI_act_wi
Generated on Fri Aug 17 09:22:02 2012 for C-KIT-GUI-GTK 0.10 by  doxygen 1.6.3