Freeciv-3.3
Loading...
Searching...
No Matches
Functions
chatline.h File Reference
#include <gtk/gtk.h>
#include "chatline_g.h"

Go to the source code of this file.

Functions

void chatline_init (void)
 
void inputline_make_chat_link (struct tile *ptile, bool unit)
 
bool inputline_has_focus (void)
 
void inputline_grab_focus (void)
 
bool inputline_is_visible (void)
 
void set_output_window_text (const char *text)
 
bool chatline_is_scrolled_to_bottom (void)
 
void chatline_scroll_to_bottom (bool delayed)
 
void set_message_buffer_view_link_handlers (GtkWidget *view)
 
GtkWidgetinputline_toolkit_view_new (void)
 
void inputline_toolkit_view_append_button (GtkWidget *toolkit_view, GtkWidget *button)
 
void apply_text_tag (const struct text_tag *ptag, GtkTextBuffer *buf, ft_offset_t text_start_offset, const char *text)
 
void scroll_if_necessary (GtkTextView *textview, GtkTextMark *scroll_target)
 

Function Documentation

◆ apply_text_tag()

void apply_text_tag ( const struct text_tag ptag,
GtkTextBuffer buf,
ft_offset_t  text_start_offset,
const char text 
)

Convert a struct text_tag to a GtkTextTag.

Definition at line 756 of file chatline.c.

Referenced by real_luaconsole_append(), and real_output_window_append().

◆ chatline_init()

void chatline_init ( void  )

Initializes the chatline stuff.

Definition at line 1303 of file chatline.c.

Referenced by activate_gui(), and ui_main().

◆ chatline_is_scrolled_to_bottom()

bool chatline_is_scrolled_to_bottom ( void  )

Returns whether the chatline is scrolled to the bottom.

Definition at line 960 of file chatline.c.

Referenced by button_toggled(), and voteinfo_gui_update().

◆ chatline_scroll_to_bottom()

void chatline_scroll_to_bottom ( bool  delayed)

Scrolls the pregame and in-game chat windows all the way to the bottom. If delayed is TRUE, it will be done in a idle_callback.

Definition at line 1007 of file chatline.c.

Referenced by button_toggled(), chatline_scroll_callback(), main_message_area_resize(), main_message_area_size_allocate(), real_set_client_page(), and voteinfo_gui_update().

◆ inputline_grab_focus()

void inputline_grab_focus ( void  )

Gives the focus to the intput line.

Definition at line 80 of file chatline.c.

Referenced by real_set_client_page(), toplevel_key_press_handler(), and toplevel_key_press_handler().

◆ inputline_has_focus()

bool inputline_has_focus ( void  )

Returns TRUE iff the input line has focus.

Definition at line 72 of file chatline.c.

Referenced by toplevel_key_press_handler(), toplevel_key_press_handler(), and toplevel_key_release_handler().

◆ inputline_is_visible()

bool inputline_is_visible ( void  )

Returns TRUE iff the input line is currently visible.

Definition at line 88 of file chatline.c.

Referenced by toplevel_key_press_handler(), and toplevel_key_press_handler().

◆ inputline_make_chat_link()

void inputline_make_chat_link ( struct tile ptile,
bool  unit 
)

Make a chat link at the current position or make the current selection clickable.

Definition at line 475 of file chatline.c.

Referenced by butt_down_mapcanvas(), and right_butt_down_mapcanvas().

◆ inputline_toolkit_view_append_button()

void inputline_toolkit_view_append_button ( GtkWidget toolkit_view,
GtkWidget button 
)

Appends a button to the inputline toolkit view widget.

Definition at line 1293 of file chatline.c.

Referenced by create_start_page(), and setup_widgets().

◆ inputline_toolkit_view_new()

GtkWidget * inputline_toolkit_view_new ( void  )

Returns a new inputline toolkit view widget that can contain the inputline.

This widget has the following datas: "button_box": pointer to the GtkHBox where to append buttons.

Returns a new inputline toolkit view widget that can contain the inputline.

This widget has the following datas: "button_box": pointer to the GtkBox where to append buttons.

Definition at line 1271 of file chatline.c.

Referenced by create_start_page(), and setup_widgets().

◆ scroll_if_necessary()

void scroll_if_necessary ( GtkTextView textview,
GtkTextMark scroll_target 
)

Scroll a textview so that the given mark is visible, but only if the scroll window containing the textview is very close to the bottom. The text mark 'scroll_target' should probably be the first character of the last line in the text buffer.

Definition at line 558 of file chatline.c.

Referenced by real_luaconsole_append(), and real_output_window_append().

◆ set_message_buffer_view_link_handlers()

void set_message_buffer_view_link_handlers ( GtkWidget view)

Set the appropriate callbacks for the message buffer.

Definition at line 745 of file chatline.c.

Referenced by luaconsole_dialog_create(), and setup_widgets().

◆ set_output_window_text()

void set_output_window_text ( const char text)

Set given text to output window

Definition at line 952 of file chatline.c.