# signs_gui.cpp File Reference

`#include "stdafx.h"`
`#include "openttd.h"`
`#include "gui.h"`
`#include "textbuf_gui.h"`
`#include "window_gui.h"`
`#include "player_gui.h"`
`#include "signs.h"`
`#include "debug.h"`
`#include "variables.h"`
`#include "command_func.h"`
`#include "strings_func.h"`
`#include "core/alloc_func.hpp"`
`#include "window_func.h"`
`#include "map_func.h"`
`#include "gfx_func.h"`
`#include "viewport_func.h"`
`#include "table/strings.h"`
`#include "table/sprites.h"`

Go to the source code of this file.

## Data Structures

struct | editsign_d

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

static int CDECL | SignNameSorter (const void *a, const void *b)
static void | GlobalSortSignList ()
static void | SignListWndProc (Window *w, WindowEvent *e)
void | ShowSignList ()
static void | UpdateSignEditWindow (Window *w, const Sign *si)
static void | RenameSign (SignID index, const char *text)
static void | QuerySignEditWndProc (Window *w, WindowEvent *e)
void | ShowRenameSignWindow (const Sign *si)
void | DeleteRenameSignWindow (SignID sign)

## Variables

static const Sign ** | _sign_sort
static uint | _num_sign_sort
static char | _bufcache [64]
static const Sign * | _last_sign
static const Widget | _sign_list_widget []
static const WindowDesc | _sign_list_desc
static char | _edit_str_buf [64]
static const Widget | _query_sign_edit_widgets []
static const WindowDesc | _query_sign_edit_desc

## Detailed Description

Definition in file signs_gui.cpp.

## Variable Documentation

const WindowDesc _query_sign_edit_desc`[static]`

Initial value:

     {
      190, 170, 260, 42, 260, 42,
      WC_QUERY_STRING, WC_NONE,
      WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET,
      _query_sign_edit_widgets,
      QuerySignEditWndProc
    }

Definition at line 304 of file signs_gui.cpp.

const Widget _query_sign_edit_widgets[]`[static]`

Initial value:

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

Definition at line 290 of file signs_gui.cpp.

const WindowDesc _sign_list_desc`[static]`

Initial value:

     {
      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,
      SignListWndProc
    }

Definition at line 140 of file signs_gui.cpp.

const Widget _sign_list_widget[]`[static]`

Initial value:

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

Definition at line 130 of file signs_gui.cpp.