Modules
ADT Database GTK2 GUI IP PiJAX Public Sql Stdio Subversion System Tools Xosd lua v4l2 wx
Recent Changes
Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0
Popular Downloads
Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48
|
Module Information
GUI.GTK2
Viewing contents of GUI_GTK2-0.1/box.cmod
#include "global.h"
#include "svalue.h"
#include "interpret.h"
#include
/* This must be included last! */
#include "module.h"
#include "gtk2.h"
/*! @module GUI */
/*! @module GTK2 */
/*! @class Box
*!
*! a base class for box containers
*!
*! @b{ Object Hierarchy @}
*!
*! @[Object] -> @[Widget] -> @[Container] -> Box
*/
PIKECLASS Box
program_flags PROGRAM_USES_PARENT;
{
INHERIT Container;
/* FIXME: isn't there a nicer way to do that? */
#define tObjImpl_WIDGET tObj
/*! @decl void pack_start(Widget w, void|int(0..1) expand, void|int(0..1) fill, void|int padding)
*!
*! take a look at the gtk+-2.0 docs
*!
*! @param w
*! the Widget to add
*! @param expand
*! whether the new child is to be given extra space allocated to this box. The extra@
*! space will be divided evenly between all children of this box that use this option.
*! @param fill
*! whether space given to child by the expand option is actually allocated to child,@
*! rather than just padding it. This parameter has no effect if expand is set to 0.@
*! A child is always allocated the full height of a HBox and the full width of a@
*! VBox. This option affects the other dimension.
*! @param padding
*! extra space in pixels to put between this child and it's neighbors
*/
PIKEFUN void pack_start(Widget w,
void|int(0..1) expand, void|int(0..1) fill, void|int padding)
{
int exp=1;
int fil=1;
int pad=0;
if (args>1) exp=expand->u.integer;
if (args>2) fil=fill->u.integer;
if (args>3) pad=padding->u.integer;
gtk_box_pack_start(GTK_BOX(GTK2_LOW),
GTK_WIDGET(
((struct Object_struct*)get_storage(Pike_sp[-args].u.ptr, Object_program))->data
),
exp,fil,pad);
pop_n_elems(args);
}
/*! @decl void pack_end(Widget w, void|int(0..1) expand, void|int(0..1) fill, void|int padding)
*!
*! take a look at the gtk+-2.0 docs
*!
*! @param w
*! the Widget to add
*! @param expand
*! whether the new child is to be given extra space allocated to this box. The extra@
*! space will be divided evenly between all children of this box that use this option.
*! @param fill
*! whether space given to child by the expand option is actually allocated to child,@
*! rather than just padding it. This parameter has no effect if expand is set to 0.@
*! A child is always allocated the full height of a HBox and the full width of a@
*! VBox. This option affects the other dimension.
*! @param padding
*! extra space in pixels to put between this child and its neighbors
*/
PIKEFUN void pack_end(Widget w,
void|int(0..1) expand, void|int(0..1) fill, void|int padding)
{
int exp=1;
int fil=1;
int pad=0;
if (args>1) exp=expand->u.integer;
if (args>2) fil=fill->u.integer;
if (args>3) pad=padding->u.integer;
gtk_box_pack_end(GTK_BOX(GTK2_LOW),
GTK_WIDGET(
((struct Object_struct*)get_storage(Pike_sp[-args].u.ptr, Object_program))->data
),
exp,fil,pad);
pop_n_elems(args);
}
INIT
{
}
EXIT
{
}
}
/*! @endclass */
/*! @endmodule */
/*! @endmodule */
void pike_init_gtk2_box(void)
{
INIT
}
void pike_exit_gtk2_box(void)
{
EXIT
}
|
|
|