BEAST/BSE - Better Audio System and Sound Engine
0.8.2
|
#include "gxkutils.hh"
Go to the source code of this file.
Defines | |
#define | GXK_SCROLL_TEXT_WIDGET_LOOK |
#define | gxk_scroll_text_aprintf(sctext,...) |
Typedefs | |
typedef GtkWidget *(* | GxkTextTextgetHandler )(gpointer user_data, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values) |
Enumerations | |
enum | GxkScrollTextFlags { GXK_SCROLL_TEXT_MONO, GXK_SCROLL_TEXT_SANS, GXK_SCROLL_TEXT_SERIF, GXK_SCROLL_TEXT_WRAP, GXK_SCROLL_TEXT_CENTER, GXK_SCROLL_TEXT_WIDGET_BG, GXK_SCROLL_TEXT_NAVIGATABLE, GXK_SCROLL_TEXT_EDITABLE, GXK_SCROLL_TEXT_HFIXED, GXK_SCROLL_TEXT_VFIXED } |
Functions | |
void | gxk_text_view_enter_browse_mode (GtkTextView *tview) |
void | gxk_text_view_leave_browse_mode (GtkTextView *tview) |
void | gxk_text_view_cursor_to_start (GtkTextView *tview) |
void | gxk_text_view_cursor_to_end (GtkTextView *tview) |
void | gxk_text_view_cursor_normal (GtkTextView *tview) |
void | gxk_text_view_cursor_busy (GtkTextView *tview) |
GtkWidget * | gxk_scroll_text_create (GxkScrollTextFlags flags, const gchar *string) |
GtkWidget * | gxk_scroll_text_create_for (GxkScrollTextFlags flags, GtkWidget *parent) |
void | gxk_scroll_text_set_index (GtkWidget *sctext, const gchar *uri) |
void | gxk_scroll_text_display (GtkWidget *sctext, const gchar *uri) |
void | gxk_scroll_text_enter (GtkWidget *sctext, const gchar *uri) |
void | gxk_scroll_text_advance (GtkWidget *sctext, const gchar *uri) |
void | gxk_scroll_text_rewind (GtkWidget *sctext) |
void | gxk_scroll_text_set (GtkWidget *sctext, const gchar *string) |
void | gxk_scroll_text_set_tsm (GtkWidget *sctext, const gchar *string) |
void | gxk_scroll_text_clear (GtkWidget *sctext) |
void | gxk_scroll_text_push_indent (GtkWidget *sctext) |
void | gxk_scroll_text_append (GtkWidget *sctext, const gchar *string) |
void | gxk_scroll_text_append_tsm (GtkWidget *sctext, const gchar *string) |
void | gxk_scroll_text_append_file (GtkWidget *sctext, const gchar *file_name) |
void | gxk_scroll_text_append_file_tsm (GtkWidget *sctext, const gchar *file_name) |
void | gxk_scroll_text_pop_indent (GtkWidget *sctext) |
GtkTextView * | gxk_scroll_text_get_text_view (GtkWidget *sctext) |
void | gxk_text_add_tsm_path (const gchar *path) |
void | gxk_text_buffer_init_custom (void) |
void | gxk_text_buffer_cursor_to_start (GtkTextBuffer *tbuffer) |
void | gxk_text_buffer_cursor_to_end (GtkTextBuffer *tbuffer) |
void | gxk_text_buffer_append_from_string (GtkTextBuffer *tbuffer, gboolean parse_tsm, guint indent_margin, guint text_length, const gchar *text) |
void | gxk_text_buffer_append_from_file (GtkTextBuffer *tbuffer, gboolean parse_tsm, guint indent_margin, const gchar *file_name) |
void | gxk_text_register_textget_handler (const gchar *element_name, GxkTextTextgetHandler handler, gpointer user_data) |
void | gxk_text_buffer_add_textgets_to_view (GtkTextBuffer *tbuffer, GtkTextView *tview) |
void gxk_scroll_text_advance | ( | GtkWidget * | sctext, |
const gchar * | uri | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
uri | resource locator |
Relative to the url currently being displayed load and display the possibly partial (relative) url uri. Navigation history is affected.
void gxk_scroll_text_append | ( | GtkWidget * | sctext, |
const gchar * | string | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
string | the text to be displayed |
Append string to the textual contents of this sctext.
void gxk_scroll_text_append_file | ( | GtkWidget * | sctext, |
const gchar * | file_name | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
file_name | file holding the text to be displayed |
Append the contents of file_name to the textual contents of this sctext.
void gxk_scroll_text_append_file_tsm | ( | GtkWidget * | sctext, |
const gchar * | file_name | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
file_name | file holding the text to be displayed in tag-span-markup |
Append the contents of file_name to the textual contents of this sctext, where those contents are marked up with tag-span-markup.
void gxk_scroll_text_append_tsm | ( | GtkWidget * | sctext, |
const gchar * | string | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
string | the text to be displayed in tag-span-markup |
Append string to the textual contents of this sctext, where string is marked up with tag-span-markup.
void gxk_scroll_text_clear | ( | GtkWidget * | sctext | ) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
Clear the textual contents of this sctext and reset the indentation level.
GtkWidget* gxk_scroll_text_create | ( | GxkScrollTextFlags | flags, |
const gchar * | string | ||
) |
flags | scroll text flags |
string | default contents |
Create a scrollable text view. Behaviour and apperance can be tweaked by specifying various flags:
GXK_SCROLL_TEXT_MONO
- use a fixed width font; GXK_SCROLL_TEXT_SANS
- use a sans serif font; GXK_SCROLL_TEXT_SERIF
- use a serif font; GXK_SCROLL_TEXT_WRAP
- allow word wrapping of string; GXK_SCROLL_TEXT_CENTER
- center string; GXK_SCROLL_TEXT_WIDGET_BG
- do not use white as background, but keep the usual (grey) widget background; GXK_SCROLL_TEXT_NAVIGATABLE
- add a navigation bar and allow the user to navigate through clickable links; GXK_SCROLL_TEXT_EDITABLE
- permit modifications of the text; GXK_SCROLL_TEXT_HFIXED
- make horizontal dimension unscrollable GXK_SCROLL_TEXT_VFIXED
- make vertical dimension unscrollable GXK_SCROLL_TEXT_WIDGET_LOOK
- this is a combination of flags to adjust the scroll text to look like an ordinary GtkLabel, which amounts to using a sans serif font, normal widget background and allowing word wrapping. void gxk_scroll_text_display | ( | GtkWidget * | sctext, |
const gchar * | uri | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
uri | resource locator |
Load and display the resource from uri without altering the navigation history.
void gxk_scroll_text_enter | ( | GtkWidget * | sctext, |
const gchar * | uri | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
uri | resource locator |
Load and display the url uri. Navigation history is affected.
GtkTextView* gxk_scroll_text_get_text_view | ( | GtkWidget * | sctext | ) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
Return the internally used GtkTextView of this sctext.
void gxk_scroll_text_pop_indent | ( | GtkWidget * | sctext | ) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
Decrement the global indentation level after a previous increment with gxk_scroll_text_push_indent().
void gxk_scroll_text_push_indent | ( | GtkWidget * | sctext | ) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
Increment the global indentation level, which affects overall indentation of text added with gxk_scroll_text_append() and friends.
void gxk_scroll_text_rewind | ( | GtkWidget * | sctext | ) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
Go back in navigation history as far as possible.
void gxk_scroll_text_set | ( | GtkWidget * | sctext, |
const gchar * | string | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
string | the new text to be displayed |
Replace the textual contents of this sctext with string.
void gxk_scroll_text_set_index | ( | GtkWidget * | sctext, |
const gchar * | uri | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
uri | resource locator |
Affect what uri is being displayed by pressing on the "Index" navigation button.
void gxk_scroll_text_set_tsm | ( | GtkWidget * | sctext, |
const gchar * | string | ||
) |
sctext | a scroll text widget as returned from gxk_scroll_text_create() |
string | the new text to be displayed in tag-span-markup |
Replace the textual contents of this sctext with string, where string is marked up with tag-span-markup.
void gxk_text_view_cursor_to_end | ( | GtkTextView * | tview | ) |
tview | a GtkTextView object |
Move the insertion and selection bound mark to the end of the text view's buffer and keep the cursor on screen.
void gxk_text_view_cursor_to_start | ( | GtkTextView * | tview | ) |
tview | a GtkTextView object |
Move the insertion and selection bound mark to the start of the text view's buffer and keep the cursor on screen.
void gxk_text_view_enter_browse_mode | ( | GtkTextView * | tview | ) |
tview | a GtkTextView object |
Install key press handlers on a text view which allow scrolling its contents into any direction.
void gxk_text_view_leave_browse_mode | ( | GtkTextView * | tview | ) |
tview | a GtkTextView object |
Deinstall key press handlers previously installed with gxk_text_view_enter_browse_mode().