Freeciv-3.2
|
#include <SDL2/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 231 of file widget_window.c.
Referenced by popup_races_dialog(), real_city_dialog_popup(), and science_report_dialog_popup().
Allocate Window Widget Structure. Text to titlebar is taken from 'title'.
Definition at line 180 of file widget_window.c.
Referenced by combo_popup(), create_window(), economy_report_dialog_popup(), meswin_dialog_popup(), nation_button_callback(), notify_goto_dialog_new(), option_dialog_new(), popup_action_selection(), popup_advanced_terrain_dialog(), popup_bribe_dialog(), popup_change_research_dialog(), popup_change_research_goal_dialog(), popup_city_cma_dialog(), popup_conn_list_dialog(), popup_connection_dialog(), popup_diplomacy_dialog(), popup_diplomatic_objects(), popup_find_dialog(), popup_goto_airlift_dialog(), popup_government_dialog(), popup_hurry_production_dialog(), popup_image(), popup_impr_info(), popup_incite_dialog(), popup_join_game_dialog(), popup_load_del_presets_dialog(), popup_load_game_dialog(), popup_minimap_window(), popup_new_user_passwd_dialog(), popup_newcity_dialog(), popup_notify_dialog(), popup_pillage_dialog(), popup_players_dialog(), popup_players_nations_dialog(), popup_sabotage_dialog(), popup_sell_impr_callback(), popup_spaceship_dialog(), popup_tech_info(), popup_terrain_info_dialog(), popup_unit_disband_dlg(), popup_unit_info(), popup_unit_upgrade_dlg(), popup_unitinfo_window(), popup_upgrade_unit_callback(), popup_user_passwd_dialog(), popup_war_dialog(), popup_worklist_editor(), real_activeunits_report_dialog_update(), real_info_city_report_dialog_update(), save_cma_callback(), sell_imprvm_dlg_callback(), show_main_page(), spy_steal_popup_shared(), unit_select_dialog_popup(), units_orders_city_dlg_callback(), update_diplomacy_dialog(), and update_intel_dialog().
Move window in a event loop.
Definition at line 352 of file widget_window.c.
Referenced by move_window_group_dialog().
|
static |
Button up event handler for the window moving event loop.
Definition at line 337 of file widget_window.c.
Referenced by move_window().
|
static |
Move window as event instructs.
Definition at line 307 of file widget_window.c.
Referenced by move_window().
Redraw Window Graphic ( without other Widgets )
Definition at line 51 of file widget_window.c.
Referenced by create_window_skeleton().
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 255 of file widget_window.c.
Referenced by arrange_widgets(), combo_popup(), create_window(), economy_report_dialog_popup(), meswin_dialog_popup(), nation_button_callback(), notify_goto_dialog_update(), option_dialog_worklist(), popup_action_selection(), popup_advanced_terrain_dialog(), popup_bribe_dialog(), popup_change_research_dialog(), popup_change_research_goal_dialog(), popup_city_cma_dialog(), popup_conn_list_dialog(), popup_connection_dialog(), popup_diplomacy_dialog(), popup_diplomatic_objects(), popup_find_dialog(), popup_goto_airlift_dialog(), popup_government_dialog(), popup_hurry_production_dialog(), popup_image(), popup_impr_info(), popup_incite_dialog(), popup_join_game_dialog(), popup_load_del_presets_dialog(), popup_load_game_dialog(), popup_minimap_window(), popup_new_user_passwd_dialog(), popup_newcity_dialog(), popup_notify_dialog(), popup_pillage_dialog(), popup_players_dialog(), popup_players_nations_dialog(), popup_races_dialog(), popup_sabotage_dialog(), popup_sell_impr_callback(), popup_spaceship_dialog(), popup_tech_info(), popup_terrain_info_dialog(), popup_unit_disband_dlg(), popup_unit_info(), popup_unit_upgrade_dlg(), popup_unitinfo_window(), popup_upgrade_unit_callback(), popup_user_passwd_dialog(), popup_war_dialog(), popup_worklist_editor(), real_activeunits_report_dialog_update(), real_city_dialog_popup(), real_info_city_report_dialog_update(), save_cma_callback(), sell_imprvm_dlg_callback(), show_main_page(), spy_steal_popup_shared(), unit_select_dialog_popup(), units_orders_city_dlg_callback(), update_diplomacy_dialog(), and update_intel_dialog().
Set area for the window widget.
Definition at line 155 of file widget_window.c.
Referenced by create_window_skeleton(), and resize_window().
Selected callback for the window widget.
Definition at line 139 of file widget_window.c.
Referenced by create_window_skeleton().
Set position for the window.
Definition at line 124 of file widget_window.c.
Referenced by create_window_skeleton().
Unselected callback for the window widget.
Definition at line 147 of file widget_window.c.
Referenced by create_window_skeleton().
Definition at line 46 of file widget_window.c.
Referenced by create_window_skeleton().