Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
gxktexttools.hh File Reference
#include "gxkutils.hh"
Include dependency graph for gxktexttools.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#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)
 

Function Documentation

void gxk_scroll_text_advance ( GtkWidget *  sctext,
const gchar *  uri 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
uriresource locator

Relative to the url currently being displayed load and display the possibly partial (relative) url uri. Navigation history is affected.

Referenced by gxk_scroll_text_enter(), and gxk_scroll_text_rewind().

Here is the call graph for this function:

Here is the caller graph for this function:

void gxk_scroll_text_append ( GtkWidget *  sctext,
const gchar *  string 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
stringthe text to be displayed

Append string to the textual contents of this sctext.

Referenced by gxk_scroll_text_create(), and gxk_scroll_text_set().

Here is the call graph for this function:

Here is the caller graph for this function:

void gxk_scroll_text_append_file ( GtkWidget *  sctext,
const gchar *  file_name 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
file_namefile holding the text to be displayed

Append the contents of file_name to the textual contents of this sctext.

Referenced by gxk_scroll_text_pop_indent().

Here is the call graph for this function:

Here is the caller graph for this function:

void gxk_scroll_text_append_file_tsm ( GtkWidget *  sctext,
const gchar *  file_name 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
file_namefile 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.

Referenced by gxk_scroll_text_pop_indent().

Here is the call graph for this function:

Here is the caller graph for this function:

void gxk_scroll_text_append_tsm ( GtkWidget *  sctext,
const gchar *  string 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
stringthe 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.

Referenced by gxk_scroll_text_pop_indent(), and gxk_scroll_text_set_tsm().

Here is the call graph for this function:

Here is the caller graph for this function:

void gxk_scroll_text_clear ( GtkWidget *  sctext)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()

Clear the textual contents of this sctext and reset the indentation level.

Referenced by gxk_scroll_text_pop_indent(), gxk_scroll_text_set(), and gxk_scroll_text_set_tsm().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* gxk_scroll_text_create ( GxkScrollTextFlags  flags,
const gchar *  string 
)
Parameters
flagsscroll text flags
stringdefault 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.

Referenced by gxk_scroll_text_create().

Here is the call graph for this function:

Here is the caller graph for this function:

void gxk_scroll_text_display ( GtkWidget *  sctext,
const gchar *  uri 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
uriresource locator

Load and display the resource from uri without altering the navigation history.

void gxk_scroll_text_enter ( GtkWidget *  sctext,
const gchar *  uri 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
uriresource locator

Load and display the url uri. Navigation history is affected.

Referenced by gxk_scroll_text_rewind().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkTextView* gxk_scroll_text_get_text_view ( GtkWidget *  sctext)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
Returns
a GtkTextView widget

Return the internally used GtkTextView of this sctext.

Referenced by gxk_scroll_text_append(), gxk_scroll_text_append_file(), gxk_scroll_text_append_file_tsm(), gxk_scroll_text_append_tsm(), gxk_scroll_text_clear(), gxk_scroll_text_pop_indent(), gxk_scroll_text_push_indent(), and gxk_scroll_text_rewind().

Here is the caller graph for this function:

void gxk_scroll_text_pop_indent ( GtkWidget *  sctext)
Parameters
sctexta 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().

Here is the call graph for this function:

void gxk_scroll_text_push_indent ( GtkWidget *  sctext)
Parameters
sctexta 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.

Here is the call graph for this function:

void gxk_scroll_text_rewind ( GtkWidget *  sctext)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()

Go back in navigation history as far as possible.

Here is the call graph for this function:

void gxk_scroll_text_set ( GtkWidget *  sctext,
const gchar *  string 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
stringthe new text to be displayed

Replace the textual contents of this sctext with string.

Here is the call graph for this function:

void gxk_scroll_text_set_index ( GtkWidget *  sctext,
const gchar *  uri 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
uriresource 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 
)
Parameters
sctexta scroll text widget as returned from gxk_scroll_text_create()
stringthe 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.

Referenced by gxk_scroll_text_pop_indent().

Here is the call graph for this function:

Here is the caller graph for this function:

void gxk_text_view_cursor_to_end ( GtkTextView *  tview)
Parameters
tviewa GtkTextView object

Move the insertion and selection bound mark to the end of the text view's buffer and keep the cursor on screen.

Referenced by gxk_scroll_text_pop_indent().

Here is the call graph for this function:

Here is the caller graph for this function:

void gxk_text_view_cursor_to_start ( GtkTextView *  tview)
Parameters
tviewa GtkTextView object

Move the insertion and selection bound mark to the start of the text view's buffer and keep the cursor on screen.

Referenced by gxk_scroll_text_append(), gxk_scroll_text_append_file(), gxk_scroll_text_append_file_tsm(), gxk_scroll_text_append_tsm(), and gxk_scroll_text_rewind().

Here is the caller graph for this function:

void gxk_text_view_enter_browse_mode ( GtkTextView *  tview)
Parameters
tviewa GtkTextView object

Install key press handlers on a text view which allow scrolling its contents into any direction.

Referenced by gxk_scroll_text_create().

Here is the caller graph for this function:

void gxk_text_view_leave_browse_mode ( GtkTextView *  tview)
Parameters
tviewa GtkTextView object

Deinstall key press handlers previously installed with gxk_text_view_enter_browse_mode().