The Battle for Wesnoth  1.19.0-dev
Public Member Functions | Protected Types | Private Attributes | List of all members
gui2::state_default Class Reference

#include <matrix.hpp>

Public Member Functions

 state_default ()
void set_active (const bool active)
bool get_active () const
unsigned get_state () const

Protected Types

enum  state_t { ENABLED , DISABLED }
 Possible states of the widget. More...

Private Attributes

state_t state_
 Current state of the widget. More...

Detailed Description

Definition at line 34 of file matrix.hpp.

Member Enumeration Documentation

◆ state_t

Possible states of the widget.

Note the order of the states must be the same as defined in settings.hpp.


Definition at line 51 of file matrix.hpp.

Constructor & Destructor Documentation

◆ state_default()

gui2::state_default::state_default ( )

Definition at line 40 of file matrix.cpp.

Member Function Documentation

◆ get_active()

bool gui2::state_default::get_active ( ) const

Definition at line 50 of file matrix.cpp.

References DISABLED, and state_.

Referenced by set_active().

◆ get_state()

unsigned gui2::state_default::get_state ( ) const

Definition at line 55 of file matrix.cpp.

References state_.

◆ set_active()

void gui2::state_default::set_active ( const bool  active)

Definition at line 43 of file matrix.cpp.

References DISABLED, ENABLED, get_active(), and state_.

Member Data Documentation

◆ state_

state_t gui2::state_default::state_

Current state of the widget.

The state of the widget determines what to render and how the widget reacts to certain 'events'.

Definition at line 63 of file matrix.hpp.

Referenced by get_active(), get_state(), and set_active().

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