Freeciv-3.2
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 755 of file chatline.c.

◆ chatline_init()

void chatline_init ( void  )

Initializes the chatline stuff.

Definition at line 1302 of file chatline.c.

◆ chatline_is_scrolled_to_bottom()

bool chatline_is_scrolled_to_bottom ( void  )

Returns whether the chatline is scrolled to the bottom.

Definition at line 959 of file chatline.c.

◆ 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 1006 of file chatline.c.

◆ inputline_grab_focus()

void inputline_grab_focus ( void  )

Gives the focus to the intput line.

Definition at line 79 of file chatline.c.

◆ inputline_has_focus()

bool inputline_has_focus ( void  )

Returns TRUE iff the input line has focus.

Definition at line 71 of file chatline.c.

◆ inputline_is_visible()

bool inputline_is_visible ( void  )

Returns TRUE iff the input line is currently visible.

Definition at line 87 of file chatline.c.

◆ 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 474 of file chatline.c.

◆ 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 1292 of file chatline.c.

◆ 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 1270 of file chatline.c.

◆ 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 557 of file chatline.c.

◆ 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 744 of file chatline.c.

◆ set_output_window_text()

void set_output_window_text ( const char text)

Set given text to output window

Definition at line 951 of file chatline.c.