Freeciv-3.1
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include "fcintl.h"
#include "log.h"
#include "events.h"
#include "game.h"
#include "map.h"
#include "player.h"
#include "options.h"
#include "chatline.h"
#include "citydlg.h"
#include "gui_main.h"
#include "gui_stuff.h"
#include "mapview.h"
#include "messagewin.h"
Go to the source code of this file.
Data Structures | |
struct | meswin_dialog |
Enumerations | |
enum | meswin_columns { MESWIN_COL_ICON , MESWIN_COL_MESSAGE , MESWIN_COL_WEIGHT , MESWIN_COL_STYLE , MESWIN_COL_ID , MESWIN_COL_NUM } |
enum | meswin_responses { MESWIN_RES_GOTO = 1 , MESWIN_RES_POPUP_CITY } |
Functions | |
static GtkListStore * | meswin_dialog_store_new (void) |
static void | meswin_dialog_visited_get_attr (bool visited, gint *weight, gint *style) |
static void | meswin_dialog_set_visited (GtkTreeModel *model, GtkTreeIter *iter, bool visited) |
static void | meswin_dialog_refresh (struct meswin_dialog *pdialog) |
static void | meswin_dialog_selection_callback (GtkTreeSelection *selection, gpointer data) |
static void | meswin_dialog_row_activated_callback (GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data) |
static gboolean | meswin_dialog_button_press_callback (GtkWidget *widget, GdkEventButton *ev, gpointer data) |
static void | meswin_dialog_response_callback (struct gui_dialog *pgui_dialog, int response, gpointer data) |
static void | meswin_dialog_init (struct meswin_dialog *pdialog) |
static void | meswin_dialog_free (struct meswin_dialog *pdialog) |
void | meswin_dialog_popup (bool raise) |
void | meswin_dialog_popdown (void) |
bool | meswin_dialog_is_open (void) |
void | real_meswin_dialog_update (void *unused) |
Variables | |
static struct meswin_dialog | meswin = { NULL, } |
enum meswin_columns |
Enumerator | |
---|---|
MESWIN_COL_ICON | |
MESWIN_COL_MESSAGE | |
MESWIN_COL_WEIGHT | |
MESWIN_COL_STYLE | |
MESWIN_COL_ID | |
MESWIN_COL_NUM |
Definition at line 53 of file messagewin.c.
enum meswin_responses |
Enumerator | |
---|---|
MESWIN_RES_GOTO | |
MESWIN_RES_POPUP_CITY |
Definition at line 65 of file messagewin.c.
|
static |
Mouse button press handler for the message window treeview. We only care about right clicks on a row; this action centers on the tile associated with the event at that row (if applicable).
Definition at line 247 of file messagewin.c.
Referenced by meswin_dialog_init().
|
static |
Closes a message window dialog.
Definition at line 403 of file messagewin.c.
Referenced by meswin_dialog_popdown().
|
static |
Initialize a message window dialog.
Definition at line 319 of file messagewin.c.
Referenced by meswin_dialog_popup().
bool meswin_dialog_is_open | ( | void | ) |
Return TRUE iff the message window is open.
Definition at line 442 of file messagewin.c.
Referenced by main_key_down_handler(), meswin_dialog_update(), popup_optiondlg(), and toggle_msg_window_callback().
void meswin_dialog_popdown | ( | void | ) |
Closes the message window dialog.
Definition at line 431 of file messagewin.c.
Referenced by main_key_down_handler(), popdown_all_game_dialogs(), popup_conn_list_dialog(), popup_connection_dialog(), toggle_msg_window_callback(), and ui_main().
void meswin_dialog_popup | ( | bool | raise | ) |
Popup the dialog inside the main-window, and optionally raise it.
Definition at line 416 of file messagewin.c.
Referenced by exit_meta_server_dlg_callback(), main_key_down_handler(), meswin_dialog_update(), popdown_optiondlg(), popup_connection_dialog(), real_meswin_dialog_update(), report_messages_callback(), report_messages_callback(), setup_widgets(), show_main_page(), and toggle_msg_window_callback().
|
static |
Refresh a message window dialog.
Definition at line 119 of file messagewin.c.
Referenced by meswin_dialog_init(), and real_meswin_dialog_update().
|
static |
Dialog response callback.
Definition at line 280 of file messagewin.c.
Referenced by meswin_dialog_init().
|
static |
A row has been activated by the user.
Definition at line 221 of file messagewin.c.
Referenced by meswin_dialog_init().
|
static |
Selection changed callback.
Definition at line 196 of file messagewin.c.
Referenced by meswin_dialog_init().
|
static |
Set the visited state of the store.
Definition at line 102 of file messagewin.c.
Referenced by meswin_dialog_response_callback(), and meswin_dialog_row_activated_callback().
|
static |
Create a tree model for the message window.
Definition at line 75 of file messagewin.c.
Referenced by meswin_dialog_init().
|
static |
Get the pango attributes for the visited state.
Definition at line 88 of file messagewin.c.
Referenced by meswin_dialog_refresh(), and meswin_dialog_set_visited().
void real_meswin_dialog_update | ( | void * | unused | ) |
Update the message window dialog.
Definition at line 450 of file messagewin.c.
Referenced by meswin_dialog_popup(), and meswin_dialog_update().
|
static |
Definition at line 70 of file messagewin.c.
Referenced by meswin_dialog_is_open(), meswin_dialog_popdown(), meswin_dialog_popup(), and real_meswin_dialog_update().