| 
Modules  
ADTRecent ChangesDatabase
 GTK2
 GUI
 IP
 PiJAX
 Public
 Sql
 Stdio
 Subversion
 System
 Tools
 Xosd
 lua
 v4l2
 wx
 
 
Public.Parser.XML2 1.50Public.ZeroMQ 1.1
 Public.Template.Mustache 1.0
 Public.Protocols.XMPP 1.4
 Sql.Provider.jdbc 1.0
 
 
Popular Downloads
 
Public.Parser.JSON2 1.0Public.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/label.cmod
 
#include "global.h"
#include "svalue.h"
#include "interpret.h"
#include 
/* This must be included last! */
#include "module.h"
#include "gtk2.h"
struct program* Misc_program;
/*! @module GUI */
/*! @module GTK2 */
/*! @class Label
 *! 
 *! A widget that displays a small to medium amount of text.
 */
PIKECLASS Label
 program_flags PROGRAM_USES_PARENT;
{
  INHERIT Misc;
  /*! @decl void create(string label)
   *!
   *! Creates a new label with the given text inside it
   *!
   *! @param label
   *!    text of the label
   */
  PIKEFUN void create(string label)
  {
    f_string_to_utf8(1);
    GTK2_LOW=(void*)gtk_label_new(args==0?NULL:Pike_sp[-1].u.string->str);
    pop_n_elems(args);
  }
  /*! @decl void set_text(string label)
   *!
   *! Sets the text within the GtkLabel widget. It overwrites any text that was there before.
   *! This will also clear any previously set mnemonic accelerators
   *!
   *! @param label
   *!     the text you want to set
   */
  PIKEFUN void set_text(string label)
  {
    f_string_to_utf8(1);
    gtk_label_set_text(GTK_LABEL(GTK2_LOW),Pike_sp[-1].u.string->str);
    pop_n_elems(args);
  }
  /*! @decl string get_text()
   *!
   *! Fetches the text from a label widget, as displayed on the screen. This does@
   *! not include any embedded underlines indicating mnemonics
   */
  PIKEFUN string get_text()
  {
    const gchar* str=gtk_label_get_text(GTK_LABEL(GTK2_LOW));
    push_string(make_shared_binary_string(str,strlen(str)));
    f_utf8_to_string(1);
  }
  INIT
  {
  }
  EXIT
  {
  }
}
/*! @endclass */
/*! @endmodule */
/*! @endmodule */
void pike_init_gtk2_label(void)
{
  INIT
}
void pike_exit_gtk2_label(void)
{
  EXIT
}
 |  
 |  |