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 | move |
Functions | |
static int | redraw_window (struct widget *pwindow) |
static void | window_set_position (struct widget *pwindow, int x, int y) |
static void | window_select (struct widget *pwindow) |
static void | window_unselect (struct widget *pwindow) |
static void | set_client_area (struct widget *pwindow) |
struct widget * | create_window_skeleton (struct gui_layer *pdest, utf8_str *title, Uint32 flags) |
struct widget * | create_window (struct gui_layer *pdest, utf8_str *title, Uint16 w, Uint16 h, Uint32 flags) |
bool | resize_window (struct widget *pwindow, SDL_Surface *bcgd, SDL_Color *pcolor, Uint16 new_w, Uint16 new_h) |
static Uint16 | move_window_motion (SDL_MouseMotionEvent *motion_event, void *data) |
static Uint16 | move_window_button_up (SDL_MouseButtonEvent *button_event, void *data) |
bool | move_window (struct widget *pwindow) |
Variables | |
static int(* | baseclass_redraw )(struct widget *pwidget) |
struct widget * create_window | ( | struct gui_layer * | pdest, |
utf8_str * | title, | ||
Uint16 | w, | ||
Uint16 | h, | ||
Uint32 | flags | ||
) |
Create window widget
Definition at line 227 of file widget_window.c.
Allocate Window Widget Structure. Text to titlebar is taken from 'title'.
Definition at line 176 of file widget_window.c.
Move window in a event loop.
Definition at line 348 of file widget_window.c.
|
static |
Button up event handler for the window moving event loop.
Definition at line 333 of file widget_window.c.
|
static |
Move window as event instructs.
Definition at line 303 of file widget_window.c.
Redraw Window Graphic ( without other Widgets )
Definition at line 47 of file widget_window.c.
bool resize_window | ( | struct widget * | pwindow, |
SDL_Surface * | bcgd, | ||
SDL_Color * | pcolor, | ||
Uint16 | new_w, | ||
Uint16 | new_h | ||
) |
Resize Window 'pwindow' to 'new_w' and 'new_h'. and refresh window background ( save screen under window ).
If bcgd == NULL then theme is set to white transparent ( ALPHA = 128 ).
Exp. if (resize_window(pwindow, bcgd, new_w, new_h)) { FREESURFACE(bcgd); }
Definition at line 251 of file widget_window.c.
Set area for the window widget.
Definition at line 151 of file widget_window.c.
Selected callback for the window widget.
Definition at line 135 of file widget_window.c.
Set position for the window.
Definition at line 120 of file widget_window.c.
Unselected callback for the window widget.
Definition at line 143 of file widget_window.c.