|
Freeciv-3.3
|
#include <SDL3/SDL.h>#include "log.h"#include "colors.h"#include "graphics.h"#include "gui_id.h"#include "gui_tilespec.h"#include "mapview.h"#include "themespec.h"#include "widget.h"#include "widget_p.h"Go to the source code of this file.
Data Structures | |
| struct | up_down |
Macros | |
| #define | widget_add_next(new_widget, add_dock) |
Variables | |
| static int(* | baseclass_redraw )(struct widget *pwidget) |
| #define widget_add_next | ( | new_widget, | |
| add_dock | |||
| ) |
Definition at line 48 of file widget_scrollbar.c.
| bool add_widget_to_vertical_scroll_widget_list | ( | struct advanced_dialog * | dlg, |
| struct widget * | new_widget, | ||
| struct widget * | add_dock, | ||
| bool | dir, | ||
| Sint16 | start_x, | ||
| Sint16 | start_y | ||
| ) |
Add new widget to scrolled list and set draw position of all changed widgets. dir : TRUE - upper add => add_dock->next = new_widget. FALSE - down add => add_dock->prev = new_widget. start_x, start_y - positions of first seen widget (active_widget_list). dlg->scroll ( scrollbar ) must exist. It isn't full secure to multi widget list.
Definition at line 1142 of file widget_scrollbar.c.
Referenced by add_global_worklist(), add_new_worklist_callback(), add_target_to_worklist(), add_to_chat_list(), popup_load_game_dialog(), real_conn_list_dialog_update(), real_meswin_dialog_update(), set_global_worklist(), and update_clauses_list().
| struct widget * create_horizontal | ( | SDL_Surface * | horiz_theme, |
| struct gui_layer * | pdest, | ||
| Uint16 | width, | ||
| Uint32 | flags | ||
| ) |
Create ( malloc ) horizontal scroll_bar widget structure.
Theme graphic is taken from horiz_theme surface;
This function determinate future size of horizontal scroll_bar ( width = 'width', height = 'horiz_theme->h' ) and save this in: pwidget->size rectangle ( SDL_Rect )
Return pointer to created widget.
Definition at line 292 of file widget_scrollbar.c.
| Uint32 create_horizontal_scrollbar | ( | struct advanced_dialog * | dlg, |
| Sint16 | start_x, | ||
| Sint16 | start_y, | ||
| Uint16 | width, | ||
| Uint16 | active, | ||
| bool | create_scrollbar, | ||
| bool | create_buttons, | ||
| bool | swap_start_y | ||
| ) |
Create a new horizontal scrollbar to active widgets list.
Definition at line 1541 of file widget_scrollbar.c.
|
static |
Create background image for hscrollbars then return pointer to this image.
Graphic is taken from horiz_theme surface and blit to new created image.
Definition at line 202 of file widget_scrollbar.c.
| struct widget * create_vertical | ( | SDL_Surface * | vert_theme, |
| struct gui_layer * | pdest, | ||
| Uint16 | height, | ||
| Uint32 | flags | ||
| ) |
Create ( malloc ) vertical scroll_bar widget structure.
Theme graphic is taken from vert_theme surface;
This function determinate future size of vertical scroll_bar ( width = 'vert_theme->w', height = 'height' ) and save this in: pwidget->size rectangle ( SDL_Rect )
Return pointer to created widget.
Definition at line 160 of file widget_scrollbar.c.
| Uint32 create_vertical_scrollbar | ( | struct advanced_dialog * | dlg, |
| Uint8 | step, | ||
| Uint8 | active, | ||
| bool | create_scrollbar, | ||
| bool | create_buttons | ||
| ) |
Create a new vertical scrollbar to active widgets list.
Definition at line 482 of file widget_scrollbar.c.
|
static |
Create background image for vscrollbars, then return pointer to that image.
Graphic is taken from vert_theme surface and blit to new created image.
Definition at line 70 of file widget_scrollbar.c.
| bool del_widget_from_vertical_scroll_widget_list | ( | struct advanced_dialog * | dlg, |
| struct widget * | pwidget | ||
| ) |
Delete widget from scrolled list and set draw position of all changed widgets. Don't free dlg and dlg->scroll (if exist) It is full secure for multi widget list case.
Definition at line 1340 of file widget_scrollbar.c.
Referenced by edit_worklist_callback(), ok_sell_impr_callback(), real_units_report_dialog_update(), remove_clause_widget_from_list(), remove_item_from_worklist(), sell_imprvm_dlg_ok_callback(), and set_global_worklist().
|
static |
Scroll widgets down.
Definition at line 1050 of file widget_scrollbar.c.
Draw horizontal scrollbar.
Definition at line 316 of file widget_scrollbar.c.
Draw vertical scrollbar.
Definition at line 183 of file widget_scrollbar.c.
|
static |
Get current active position of the scrollbar.
Definition at line 348 of file widget_scrollbar.c.
|
static |
Get step of the scrollbar.
Definition at line 332 of file widget_scrollbar.c.
Callback for the scroll-down event loop.
Definition at line 864 of file widget_scrollbar.c.
Callback for the scroll-up event loop.
Definition at line 911 of file widget_scrollbar.c.
Blit horizontal scrollbar gfx to surface its on.
Definition at line 260 of file widget_scrollbar.c.
Blit vertical scrollbar gfx to surface its on.
Definition at line 128 of file widget_scrollbar.c.
|
static |
Callback for scrollbar event loops' mouse up events.
Definition at line 1041 of file widget_scrollbar.c.
|
static |
Handle mouse motion events of the vertical scrollbar event loop.
Definition at line 953 of file widget_scrollbar.c.
| void setup_vertical_scrollbar_area | ( | struct scroll_bar * | scroll, |
| Sint16 | start_x, | ||
| Sint16 | start_y, | ||
| Uint16 | height, | ||
| bool | swap_start_x | ||
| ) |
Setup area for the vertical scrollbar.
Definition at line 563 of file widget_scrollbar.c.
| void setup_vertical_scrollbar_default_callbacks | ( | struct scroll_bar * | scroll | ) |
Set default vertical scrollbar handling for scrollbar.
Definition at line 1518 of file widget_scrollbar.c.
User interacted with down button of advanced dialog.
Definition at line 428 of file widget_scrollbar.c.
User interacted with up button of advanced dialog.
Definition at line 401 of file widget_scrollbar.c.
FIXME : fix main funct : vertic_scroll_widget_list(...)
Definition at line 455 of file widget_scrollbar.c.
|
static |
Scroll widgets up.
Definition at line 1079 of file widget_scrollbar.c.
|
static |
Scroll vertical widget list with the mouse movement.
Definition at line 1101 of file widget_scrollbar.c.
|
static |
Scroll pointers on list. dir == directions: up == -1, down == 1.
Definition at line 629 of file widget_scrollbar.c.