GscInfo

GscInfo — Calltips object

Synopsis

                    GscInfoPrivate;
                    GscInfo;
                    GscInfoClass;
GscInfo *           gsc_info_new                        (void);
void                gsc_info_move_to_cursor             (GscInfo *self,
                                                         GtkTextView *view);
void                gsc_info_set_markup                 (GscInfo *self,
                                                         const gchar *markup);
void                gsc_info_set_adjust_height          (GscInfo *self,
                                                         gboolean adjust,
                                                         gint max_height);
void                gsc_info_set_adjust_width           (GscInfo *self,
                                                         gboolean adjust,
                                                         gint max_width);
void                gsc_info_set_custom                 (GscInfo *self,
                                                         GtkWidget *custom_widget);
GtkWidget *         gsc_info_get_custom                 (GscInfo *self);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GscInfo

Implemented Interfaces

GscInfo implements AtkImplementorIface and GtkBuildable.

Signals

  "show-info"                                      : Run Last / Action

Description

This object can be used to show a calltip or help.

Details

GscInfoPrivate

typedef struct _GscInfoPrivate GscInfoPrivate;


GscInfo

typedef struct _GscInfo GscInfo;


GscInfoClass

typedef struct {
	GtkWindowClass parent_class;
} GscInfoClass;


gsc_info_new ()

GscInfo *           gsc_info_new                        (void);

Returns :

The new GscInfo.

gsc_info_move_to_cursor ()

void                gsc_info_move_to_cursor             (GscInfo *self,
                                                         GtkTextView *view);

Moves the GscInfo to under the view cursor. If it cannot be shown down, it will be shown up

self :

The GscInfo

view :

The current GtkTextView where we want to show the info

gsc_info_set_markup ()

void                gsc_info_set_markup                 (GscInfo *self,
                                                         const gchar *markup);

Sets the text markup to be shown into the GscInfo window.

self :

The GscInfo

markup :

Text markup to be shown (see Pango markup format).

gsc_info_set_adjust_height ()

void                gsc_info_set_adjust_height          (GscInfo *self,
                                                         gboolean adjust,
                                                         gint max_height);

TRUE adjust height to the content. If the content is only a line, the info will be small and if there are a lot of lines, the info will be large to the max_height

self :

The GscInfo

adjust :

TRUE to adjust height to content, FALSE to fixed height

max_height :

if adjust = TRUE, set the max height. -1 to preserve the current value

gsc_info_set_adjust_width ()

void                gsc_info_set_adjust_width           (GscInfo *self,
                                                         gboolean adjust,
                                                         gint max_width);

TRUE adjust width to the content. If the content is only a line, the info will be small and if there are a lot of lines, the info will be large to the max_width

self :

The GscInfo

adjust :

TRUE to adjust width to content, FALSE to fixed width

max_width :

if adjust = TRUE, set the max height. -1 to preserve the current value

gsc_info_set_custom ()

void                gsc_info_set_custom                 (GscInfo *self,
                                                         GtkWidget *custom_widget);

Replaces the widget packed into the window with custom_widget. By default a box with a GtkScrolledWindow and a GtkLabel is embedded in the window.

self :

The GscInfo

custom_widget :

A GtkWidget

gsc_info_get_custom ()

GtkWidget *         gsc_info_get_custom                 (GscInfo *self);

self :

The GscInfo

Returns :

The custom widget setted or NULL.

Signal Details

The "show-info" signal

void                user_function                      (GscInfo *info,
                                                        gpointer user_data)      : Run Last / Action

This signal is emited before any "show" management. You can connect to this signal if you want to change some properties or position before to so the real "show".

info :

The GscInf who emits the signal

user_data :

user data set when the signal handler was connected.