signs_gui.cpp File Reference

The GUI for signs. More...

#include "stdafx.h"
#include "company_gui.h"
#include "company_func.h"
#include "signs_base.h"
#include "signs_func.h"
#include "debug.h"
#include "command_func.h"
#include "strings_func.h"
#include "window_func.h"
#include "map_func.h"
#include "gfx_func.h"
#include "viewport_func.h"
#include "querystring_gui.h"
#include "sortlist_type.h"
#include "string_func.h"
#include "table/strings.h"

Go to the source code of this file.

Data Structures

struct  SignList
struct  SignListWindow
struct  SignWindow

Enumerations

enum  QueryEditSignWidgets {
  QUERY_EDIT_SIGN_WIDGET_TEXT = 3, QUERY_EDIT_SIGN_WIDGET_OK, QUERY_EDIT_SIGN_WIDGET_CANCEL, QUERY_EDIT_SIGN_WIDGET_DELETE,
  QUERY_EDIT_SIGN_WIDGET_PREVIOUS = QUERY_EDIT_SIGN_WIDGET_DELETE + 2, QUERY_EDIT_SIGN_WIDGET_NEXT
}

Functions

void ShowSignList ()
static bool RenameSign (SignID index, const char *text)
 Actually rename the sign.
void HandleClickOnSign (const Sign *si)
void ShowRenameSignWindow (const Sign *si)
void DeleteRenameSignWindow (SignID sign)

Variables

static const Widget _sign_list_widget []
static const WindowDesc _sign_list_desc (WDP_AUTO, WDP_AUTO, 358, 138, 358, 138, WC_SIGN_LIST, WC_NONE, WDF_STD_TOOLTIPS|WDF_STD_BTN|WDF_DEF_WIDGET|WDF_STICKY_BUTTON|WDF_RESIZABLE, _sign_list_widget)
static const Widget _query_sign_edit_widgets []
static const WindowDesc _query_sign_edit_desc (190, 170, 260, 42, 260, 42, WC_QUERY_STRING, WC_NONE, WDF_STD_TOOLTIPS|WDF_STD_BTN|WDF_DEF_WIDGET|WDF_CONSTRUCTION, _query_sign_edit_widgets)


Detailed Description

The GUI for signs.

Definition in file signs_gui.cpp.


Function Documentation

static bool RenameSign ( SignID  index,
const char *  text 
) [static]

Actually rename the sign.

Parameters:
index the sign to rename.
text the new name.
Returns:
true if the window will already be removed after returning.

Definition at line 173 of file signs_gui.cpp.

References CMD_MSG, CMD_RENAME_SIGN, DoCommandP(), and StrEmpty().


Variable Documentation

const Widget _query_sign_edit_widgets[] [static]

Initial value:

 {
{ WWT_CLOSEBOX, RESIZE_NONE,  COLOUR_GREY,   0,  10,   0,  13, STR_00C5,          STR_018B_CLOSE_WINDOW},
{  WWT_CAPTION, RESIZE_NONE,  COLOUR_GREY,  11, 259,   0,  13, STR_012D,          STR_NULL },
{    WWT_PANEL, RESIZE_NONE,  COLOUR_GREY,   0, 259,  14,  29, STR_NULL,          STR_NULL },
{  WWT_EDITBOX, RESIZE_NONE,  COLOUR_GREY,   2, 257,  16,  27, STR_SIGN_OSKTITLE, STR_NULL },  
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY,   0,  60,  30,  41, STR_012F_OK,       STR_NULL },
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY,  61, 120,  30,  41, STR_012E_CANCEL,   STR_NULL },
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 121, 180,  30,  41, STR_0290_DELETE,   STR_NULL },
{    WWT_PANEL, RESIZE_NONE,  COLOUR_GREY, 181, 237,  30,  41, STR_NULL,          STR_NULL },
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 238, 248,  30,  41, STR_6819,          STR_PREVIOUS_SIGN_TOOLTIP },
{  WWT_TEXTBTN, RESIZE_NONE,  COLOUR_GREY, 249, 259,  30,  41, STR_681A,          STR_NEXT_SIGN_TOOLTIP },
{ WIDGETS_END },
}

Definition at line 320 of file signs_gui.cpp.

const Widget _sign_list_widget[] [static]

Initial value:

 {
{   WWT_CLOSEBOX,   RESIZE_NONE,  COLOUR_GREY,     0,    10,     0,    13, STR_00C5,              STR_018B_CLOSE_WINDOW},
{    WWT_CAPTION,  RESIZE_RIGHT,  COLOUR_GREY,    11,   345,     0,    13, STR_SIGN_LIST_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS},
{  WWT_STICKYBOX,     RESIZE_LR,  COLOUR_GREY,   346,   357,     0,    13, 0x0,                   STR_STICKY_BUTTON},
{      WWT_PANEL,     RESIZE_RB,  COLOUR_GREY,     0,   345,    14,   137, 0x0,                   STR_NULL},
{  WWT_SCROLLBAR,    RESIZE_LRB,  COLOUR_GREY,   346,   357,    14,   125, 0x0,                   STR_0190_SCROLL_BAR_SCROLLS_LIST},
{  WWT_RESIZEBOX,   RESIZE_LRTB,  COLOUR_GREY,   346,   357,   126,   137, 0x0,                   STR_RESIZE_BUTTON},
{   WIDGETS_END},
}

Definition at line 144 of file signs_gui.cpp.


Generated on Wed Jul 15 20:36:12 2009 for OpenTTD by  doxygen 1.5.6