The Battle for Wesnoth  1.15.0-dev
Public Member Functions | Public Attributes | List of all members
point Struct Reference

Holds a 2D point. More...

#include <point.hpp>

Public Member Functions

 point ()
 
 point (const int x_, const int y_)
 
 point (const SDL_Point &p)
 
 operator SDL_Point () const
 Allow implicit conversion to SDL_Point. More...
 
bool operator== (const point &point) const
 
bool operator!= (const point &point) const
 
bool operator< (const point &point) const
 
bool operator<= (const point &point) const
 
point operator+ (const point &point) const
 
pointoperator+= (const point &point)
 
point operator- (const point &point) const
 
pointoperator-= (const point &point)
 

Public Attributes

int x
 x coordinate. More...
 
int y
 y coordinate. More...
 

Detailed Description

Holds a 2D point.

Definition at line 23 of file point.hpp.

Constructor & Destructor Documentation

◆ point() [1/3]

point::point ( )
inline

Definition at line 25 of file point.hpp.

◆ point() [2/3]

point::point ( const int  x_,
const int  y_ 
)
inline

Definition at line 31 of file point.hpp.

◆ point() [3/3]

point::point ( const SDL_Point &  p)
inline

Definition at line 37 of file point.hpp.

Member Function Documentation

◆ operator SDL_Point()

point::operator SDL_Point ( ) const

Allow implicit conversion to SDL_Point.

Definition at line 21 of file point.cpp.

◆ operator!=()

bool point::operator!= ( const point point) const
inline

Definition at line 57 of file point.hpp.

References operator==().

◆ operator+()

point point::operator+ ( const point point) const
inline

Definition at line 72 of file point.hpp.

References operator+=(), x, and y.

◆ operator+=()

point & point::operator+= ( const point point)

Definition at line 26 of file point.cpp.

References x, and y.

Referenced by operator+().

◆ operator-()

point point::operator- ( const point point) const
inline

Definition at line 79 of file point.hpp.

References operator-=(), operator<<(), x, and y.

◆ operator-=()

point & point::operator-= ( const point point)

Definition at line 33 of file point.cpp.

References x, and y.

Referenced by operator-().

◆ operator<()

bool point::operator< ( const point point) const
inline

Definition at line 62 of file point.hpp.

References x, and y.

◆ operator<=()

bool point::operator<= ( const point point) const
inline

Definition at line 67 of file point.hpp.

References x, and y.

◆ operator==()

bool point::operator== ( const point point) const
inline

Definition at line 52 of file point.hpp.

References x, and y.

Referenced by operator!=().

Member Data Documentation

◆ x

int point::x

x coordinate.

Definition at line 44 of file point.hpp.

Referenced by preferences::_set_resolution(), gui2::gui_definition::activate(), gui2::tree_view_node::add_child(), gui2::implementation::placer_vertical_list::add_item(), gui2::implementation::placer_horizontal_list::add_item(), gui2::grid::child::border_space(), gui2::slider::calculate_best_size(), gui2::image::calculate_best_size(), gui2::container_base::calculate_best_size(), gui2::scrollbar_container::calculate_best_size(), gui2::policy::placement::horizontal_list::calculate_best_size(), gui2::grid::calculate_best_size(), gui2::tree_view_node::calculate_best_size(), gui2::policy::placement::vertical_list::calculate_best_size(), gui2::policy::placement::table::calculate_best_size(), gui2::policy::placement::independent::calculate_best_size(), gui2::grid_implementation::cell_request_reduce_width(), gui2::scrollbar_container::content_resize_request(), gui2::create_rect(), gui2::viewport_implementation::find_at(), gui2::tree_view_node::fold_internal(), CVideo::get_available_resolutions(), gui2::widget::get_best_size(), gui2::styled_widget::get_best_text_size(), font::pango_text::get_column_line(), gui2::tree_view_node::get_current_size(), gui2::tree_view_node::get_folded_size(), gui2::horizontal_scrollbar::get_length_difference(), gui2::slider::get_length_difference(), font::pango_text::get_token(), gui2::tree_view_node::get_unfolded_size(), font::pango_text::get_width(), gui2::text_box_base::handle_editing(), gui2::event::sdl_event_handler::handle_event(), gui2::text_box::handle_mouse_selection(), gui2::horizontal_scrollbar::in_orthogonal_range(), gui2::event::init_mouse_location(), CVideo::init_window(), gui2::window_implementation::layout(), gui2::grid::layout(), gui2::window::layout(), gui2::window::layout_linked_widgets(), gui2::event::mouse_motion::mouse_hover(), gui2::vertical_scrollbar::on_bar(), gui2::horizontal_scrollbar::on_bar(), gui2::slider::on_bar(), operator+(), operator+=(), operator-(), operator-=(), operator<(), operator<<(), operator<=(), operator==(), gui2::size_lock::place(), gui2::pane::place(), gui2::scrollbar_container::place(), gui2::styled_widget::place(), gui2::policy::placement::horizontal_list::place(), gui2::grid::place(), gui2::tree_view_node::place(), gui2::policy::placement::vertical_list::place(), gui2::grid::child::place(), gui2::widget::place(), gui2::policy::placement::table::place(), sdl::point_in_rect(), gui2::dialogs::tooltip::pre_show(), gui2::container_base::reduce_width(), gui2::grid::reduce_width(), gui2::grid::request_placement(), gui2::container_base::request_reduce_width(), gui2::scrollbar_container::request_reduce_width(), gui2::styled_widget::request_reduce_width(), gui2::grid::request_reduce_width(), gui2::tree_view::resize_content(), gui2::listbox::resize_content(), gui2::listbox::set_content_size(), gui2::policy::placement::horizontal_list::set_origin(), gui2::grid::set_origin(), gui2::widget::set_origin(), gui2::policy::placement::table::set_origin(), gui2::listbox::set_row_shown(), gui2::widget::set_size(), CVideo::set_window_mode(), gui2::label::signal_handler_left_button_click(), gui2::slider_base::signal_handler_left_button_down(), gui2::scrollbar_base::signal_handler_left_button_down(), gui2::slider_base::signal_handler_left_button_up(), gui2::scrollbar_base::signal_handler_left_button_up(), gui2::slider_base::signal_handler_mouse_motion(), gui2::scrollbar_base::signal_handler_mouse_motion(), gui2::label::signal_handler_right_button_click(), gui2::window::signal_handler_sdl_video_resize(), gui2::tree_view_node::unfold_internal(), and gui2::text_box::update_canvas().

◆ y

int point::y

y coordinate.

Definition at line 47 of file point.hpp.

Referenced by preferences::_set_resolution(), gui2::gui_definition::activate(), gui2::tree_view_node::add_child(), gui2::implementation::placer_vertical_list::add_item(), gui2::implementation::placer_horizontal_list::add_item(), gui2::grid::child::border_space(), gui2::image::calculate_best_size(), gui2::container_base::calculate_best_size(), gui2::scrollbar_container::calculate_best_size(), gui2::policy::placement::horizontal_list::calculate_best_size(), gui2::grid::calculate_best_size(), gui2::tree_view_node::calculate_best_size(), gui2::policy::placement::vertical_list::calculate_best_size(), gui2::listbox::calculate_best_size(), gui2::policy::placement::table::calculate_best_size(), gui2::policy::placement::independent::calculate_best_size(), gui2::grid_implementation::cell_request_reduce_height(), gui2::scrollbar_container::content_resize_request(), gui2::create_rect(), gui2::viewport_implementation::find_at(), gui2::tree_view_node::fold_internal(), CVideo::get_available_resolutions(), gui2::widget::get_best_size(), gui2::styled_widget::get_best_text_size(), font::pango_text::get_column_line(), gui2::tree_view_node::get_current_size(), font::pango_text::get_height(), gui2::vertical_scrollbar::get_length_difference(), font::pango_text::get_token(), gui2::tree_view_node::get_unfolded_size(), gui2::text_box::handle_mouse_selection(), gui2::vertical_scrollbar::in_orthogonal_range(), gui2::event::init_mouse_location(), CVideo::init_window(), gui2::window_implementation::layout(), gui2::grid::layout(), gui2::window::layout(), gui2::window::layout_linked_widgets(), gui2::event::mouse_motion::mouse_hover(), gui2::vertical_scrollbar::on_bar(), gui2::horizontal_scrollbar::on_bar(), gui2::slider::on_bar(), operator+(), operator+=(), operator-(), operator-=(), operator<(), operator<<(), operator<=(), operator==(), gui2::size_lock::place(), gui2::pane::place(), gui2::scrollbar_container::place(), gui2::styled_widget::place(), gui2::policy::placement::horizontal_list::place(), gui2::grid::place(), gui2::tree_view_node::place(), gui2::policy::placement::vertical_list::place(), gui2::grid::child::place(), gui2::widget::place(), gui2::policy::placement::table::place(), sdl::point_in_rect(), gui2::dialogs::tooltip::pre_show(), gui2::container_base::reduce_height(), gui2::grid::reduce_height(), gui2::container_base::reduce_width(), gui2::tree_view::remove_node(), gui2::grid::request_placement(), gui2::container_base::request_reduce_height(), gui2::scrollbar_container::request_reduce_height(), gui2::styled_widget::request_reduce_height(), gui2::grid::request_reduce_height(), gui2::container_base::request_reduce_width(), gui2::styled_widget::request_reduce_width(), gui2::tree_view::resize_content(), gui2::listbox::resize_content(), gui2::listbox::set_content_size(), gui2::grid::set_origin(), gui2::policy::placement::vertical_list::set_origin(), gui2::widget::set_origin(), gui2::policy::placement::table::set_origin(), gui2::listbox::set_row_shown(), gui2::widget::set_size(), CVideo::set_window_mode(), gui2::label::signal_handler_left_button_click(), gui2::slider_base::signal_handler_left_button_down(), gui2::scrollbar_base::signal_handler_left_button_down(), gui2::slider_base::signal_handler_left_button_up(), gui2::scrollbar_base::signal_handler_left_button_up(), gui2::slider_base::signal_handler_mouse_motion(), gui2::scrollbar_base::signal_handler_mouse_motion(), gui2::label::signal_handler_right_button_click(), gui2::window::signal_handler_sdl_video_resize(), and gui2::tree_view_node::unfold_internal().


The documentation for this struct was generated from the following files: