Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

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/fixed.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 Fixed
 *! 
 *! A container which allows you to position widgets at fixed coordinates
 */

PIKECLASS Fixed
 program_flags PROGRAM_USES_PARENT;
{
  INHERIT Container;

  /*! @decl void create()
   *!
   *! Creates a new Fixed
   */
  PIKEFUN void create()
  {
    GTK2_LOW=(void*)gtk_fixed_new();
  }

  /*! @decl void put(Widget w, int x, int y);
   *!
   *! Adds a widget to a Fixed container at the given position.
   *!
   *! @param w
   *!    Widget to add
   *! @param x
   *!    the horizontal position to place the widget at
   *! @param y
   *!    the vertical position to place the widget at
   */
#define tObjImpl_WIDGET tObj
  PIKEFUN void put(Widget w,int x, int y)
  {
    gtk_fixed_put(GTK_FIXED(GTK2_LOW),
      GTK_WIDGET(((struct Object_struct*)get_storage(
            Pike_sp[-args].u.ptr,
            Object_program)
          )->data),
      x,y);
    pop_n_elems(args);
  }

  /*! @decl void move(Widget w, int x, int y)
   *!
   *! Moves a child of a Fixed container to the given position.
   *!
   *! @param w
   *!    Widget to move
   *! @param x
   *!    the horizontal position to move the widget to
   *! @param y
   *!    the vertical position to move the widget to
   */
  PIKEFUN void move(Widget w,int x, int y)
  {
    gtk_fixed_move(GTK_FIXED(GTK2_LOW),
      GTK_WIDGET(((struct Object_struct*)get_storage(
            Pike_sp[-args].u.ptr,
            Object_program)
          )->data),
      x,y);
  }

  INIT
  {
  }

  EXIT
  {
  }

}

/*! @endclass */
/*! @endmodule */
/*! @endmodule */

void pike_init_gtk2_fixed(void)
{
  INIT
}

void pike_exit_gtk2_fixed(void)
{
  EXIT
}


gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University