![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
Include dependency graph for mapview_g.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | update_info_label (void) |
| Typically an info box is provided to tell the player about the state of their civilization. More... | |
| void | update_unit_info_label (const std::vector< unit * > &unit_list) |
| Update the information label which gives info on the current unit and the tile under the current unit, for specified unit. More... | |
| void | update_mouse_cursor (enum cursor_type new_cursor_type) |
| Update the mouse cursor. More... | |
| void | update_turn_done_button (bool do_restore) |
| If do_restore is false it should change the turn button style (to draw the user's attention to it). More... | |
| void | update_minimap (void) |
| Return a canvas that is the overview window. More... | |
| void | dirty_rect (int canvas_x, int canvas_y, int pixel_width, int pixel_height) |
| Mark the rectangular region as "dirty" so that we know to flush it later. More... | |
| void | dirty_all (void) |
| Mark the entire screen area as "dirty" so that we can flush it later. More... | |
| void | flush_dirty (void) |
| Flush all regions that have been previously marked as dirty. More... | |
| void | put_cross_overlay_tile (struct tile *ptile) |
| Draw a cross-hair overlay on a tile. More... | |
| void | draw_selection_rectangle (int canvas_x, int canvas_y, int w, int h) |
| Area Selection. More... | |
| void | tileset_changed (void) |
| This function is called when the tileset is changed. More... | |
| void | show_city_desc (QPixmap *pcanvas, int canvas_x, int canvas_y, struct city *pcity, int *width, int *height) |
| Draw a description for the given city. More... | |
| void | debug_tile (tile *t) |
| Callback to set the tile being debugged. More... | |
| void debug_tile | ( | tile * | t | ) |
Callback to set the tile being debugged.
Definition at line 757 of file view_map.cpp.
Referenced by do_map_click().
| void dirty_all | ( | void | ) |
Mark the entire screen area as "dirty" so that we can flush it later.
Definition at line 494 of file view_map.cpp.
Referenced by base_set_mapview_origin().
| void dirty_rect | ( | int | canvas_x, |
| int | canvas_y, | ||
| int | pixel_width, | ||
| int | pixel_height | ||
| ) |
Mark the rectangular region as "dirty" so that we know to flush it later.
Definition at line 480 of file view_map.cpp.
Referenced by animate_unit_explosion(), draw_segment(), move_unit_map_canvas(), put_nuke_mushroom_pixmaps(), and update_map_canvas().
| void draw_selection_rectangle | ( | int | canvas_x, |
| int | canvas_y, | ||
| int | w, | ||
| int | h | ||
| ) |
Area Selection.
Definition at line 546 of file view_map.cpp.
Referenced by cancel_selection_rectangle(), and editor_draw_selrect().
| void flush_dirty | ( | void | ) |
Flush all regions that have been previously marked as dirty.
See dirty_rect and dirty_all. This function is generally called after we've processed a batch of drawing operations.
Definition at line 507 of file view_map.cpp.
Referenced by animate_unit_explosion(), editor_end_selection_rectangle(), move_unit_map_canvas(), and put_nuke_mushroom_pixmaps().
| void put_cross_overlay_tile | ( | struct tile * | ptile | ) |
Draw a cross-hair overlay on a tile.
Definition at line 533 of file view_map.cpp.
Referenced by center_next_player_capital(), key_center_capital(), and unit_focus_set_and_select().
| void show_city_desc | ( | QPixmap * | pcanvas, |
| int | canvas_x, | ||
| int | canvas_y, | ||
| struct city * | pcity, | ||
| int * | width, | ||
| int * | height | ||
| ) |
Draw a description for the given city.
This description may include the name, turns-to-grow, production, and city turns-to-build (depending on client options).
(canvas_x, canvas_y) gives the location on the given canvas at which to draw the description. This is the location of the city itself so the text must be drawn underneath it. pcity gives the city to be drawn, while (*width, *height) should be set by show_city_desc to contain the width and height of the text block (centered directly underneath the city's tile).
Definition at line 733 of file view_map.cpp.
Referenced by show_city_descriptions().
| void tileset_changed | ( | void | ) |
This function is called when the tileset is changed.
Definition at line 554 of file view_map.cpp.
Referenced by fc_client::current_page(), and tilespec_reread().
| void update_info_label | ( | void | ) |
Typically an info box is provided to tell the player about the state of their civilization.
This function is called when the label is changed.
Definition at line 750 of file page_game.cpp.
Referenced by client_state(), fc_client::current_page(), handle_city_info(), handle_game_info(), handle_new_year(), handle_player_info(), and handle_start_phase().
| void update_minimap | ( | void | ) |
Return a canvas that is the overview window.
Definition at line 256 of file minimap.cpp.
Referenced by base_set_mapview_origin(), calculate_overview_dimensions(), fc_client::current_page(), map_canvas_resized(), and redraw_overview().
| void update_mouse_cursor | ( | enum cursor_type | new_cursor_type | ) |
Update the mouse cursor.
Cursor type depends on what user is doing and pointing.
Definition at line 457 of file view_map.cpp.
Referenced by control_mouse_cursor().
| void update_turn_done_button | ( | bool | do_restore | ) |
If do_restore is false it should change the turn button style (to draw the user's attention to it).
If called regularly from a timer this will give a blinking turn done button. If do_restore is true this should reset the turn done button to the default style.
Definition at line 468 of file view_map.cpp.
Referenced by blink_turn_done_button(), and update_turn_done_button_state().
| void update_unit_info_label | ( | const std::vector< unit * > & | unit_list | ) |
Update the information label which gives info on the current unit and the tile under the current unit, for specified unit.
Note that in practice punit is always the focus unit.
Clears label if punit is nullptr.
Typically also updates the cursor for the map_canvas (this is related because the info label may includes "select destination" prompt etc). And it may call update_unit_pix_label() to update the icons for units on this tile.
Definition at line 446 of file view_map.cpp.
Referenced by client_remove_unit(), client_state(), do_map_click(), do_move_unit(), focus_units_changed(), handle_city_info(), handle_new_year(), handle_unit_packet_common(), is_valid_goto_draw_line(), key_cancel_action(), key_unit_action_select_tgt(), release_goto_button(), request_unit_connect(), request_unit_goto(), request_unit_paradrop(), request_unit_patrol(), and tileset_changed().