pike.git / src / post_modules / GTK2 / source / gtklabel.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gtklabel.pre:28:   //! int width-chars   //! int wrap      signal copy_clipboard;   signal move_cursor;   signal populate_popup;      void create(string|mapping(string:mixed)|void text_or_props)   //! Creates a new label.   { -  pgtk_verify_not_inited(); -  pgtk_verify_setup(); +  pgtk2_verify_not_inited(); +  pgtk2_verify_setup();    if (args) {    if (Pike_sp[-args].type==PIKE_T_STRING) {    struct pike_string *t;    GtkWidget *gl;    get_all_args("create",args,"%T",&t);    if (t) {    ref_push_string(t);    f_string_to_utf8(1);    gl=gtk_label_new((char *)STR0(Pike_sp[-1].u.string));    pop_stack();    } else    gl=gtk_label_new(NULL);    THIS->obj=G_OBJECT(gl);    } else {    INIT_WITH_PROPS(GTK_TYPE_LABEL);    } -  my_pop_n_elems(args); +  pgtk2_pop_n_elems(args);    } else {    GtkWidget *gl;    gl=gtk_label_new(NULL);    THIS->obj=G_OBJECT(gl);    } -  pgtk__init_this_object(); +  pgtk2__init_this_object();   }      void set_text(string text);   //! Set the text in the label      require pango;   void set_markup(string text);   //! Parses text which is marked up with the Pango text markup language,   //! setting the label's text and attribute list based on the parse results.   
pike.git/src/post_modules/GTK2/source/gtklabel.pre:116:   require pango;   mapping(string:int) get_layout_offsets()   //! Obtains the coordinates where the label will draw the Pango.Layout   //! representing the text in the label; useful to convert mouse events into   //! coordinates inside the Pango.Layout, e.g. to take some action if some part   //! of the label is clicked. Of course, you will need to create a GTK2.EventBox   //! to receive the events, and pack the label inside it, since labels are a   //! GTK2.NO_WINDOW widget. Remember when using the Pango.Layout functions you   //! need to convert to and from pixels using GTK2.PANGO_SCALE.   { -  pgtk_verify_inited(); -  my_pop_n_elems(args); +  pgtk2_verify_inited(); +  pgtk2_pop_n_elems(args);    {    gint x,y;    gtk_label_get_layout_offsets(GTK_LABEL(THIS->obj),&x,&y);    ref_push_string(_STR("x")); push_int(x);    ref_push_string(_STR("y")); push_int(y);    f_aggregate_mapping(4);    }   }   endrequire;   
pike.git/src/post_modules/GTK2/source/gtklabel.pre:207:   int get_line_wrap();   //! Returns whether lines in the label are automatically wrapped.      GTK2.Widget get_mnemonic_widget();   //! Retrieves the target of the mnemonic (keyboard shortcut).      mapping(string:int) get_selection_bounds()   //! Gets the selected range of characters in the label. If there isn't a   //! selection, returns -1 for both start and end.   { -  pgtk_verify_inited(); +  pgtk2_verify_inited();    {    gint start,end;    int res=gtk_label_get_selection_bounds(GTK_LABEL(THIS->obj),&start,&end); -  my_pop_n_elems(args); +  pgtk2_pop_n_elems(args);    ref_push_string(_STR("start"));    push_int(res?start:-1);    ref_push_string(_STR("end"));    push_int(res?end:-1);    f_aggregate_mapping(4);    }   }      int get_use_markup();   //! Returns whether the label's text is interpreted as marked up with the