galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::Keyboard Class Referencefinal

Physical keyboard device and state management. More...

#include <Keyboard.hpp>

Inheritance diagram for galaxy::Keyboard:
Collaboration diagram for galaxy::Keyboard:

Public Member Functions

 Keyboard () noexcept
 Constructor.
 ~Keyboard () noexcept
 Destructor.
void begin_text_input (const SDL_TextInputType input_type, const SDL_Capitalization capitals, const bool multiline) const noexcept
 Enable window to begin processing text input.
void end_text_input () const noexcept
 Disable text input.
void clear_state () const noexcept
 Will clear any existing keyboard state.
bool has_keyboard () const noexcept
 Check if there is a keyboard connected.
bool has_onscreen_keyboard () const noexcept
 Check if an onscreen keyboard is supported.
bool onscreen_keyboard_active () const noexcept
 Check if onscreen keyboard is shown.
Public Member Functions inherited from galaxy::WindowBindable
virtual ~WindowBindable () noexcept
 Virtual destructor.

Private Member Functions

 Keyboard (Keyboard &&)=delete
 Move constructor.
Keyboardoperator= (Keyboard &&)=delete
 Move assignment operator.
 Keyboard (const Keyboard &)=delete
 Copy constructor.
Keyboardoperator= (const Keyboard &)=delete
 Copy assignment operator.

Additional Inherited Members

Protected Member Functions inherited from galaxy::WindowBindable
 WindowBindable () noexcept
 Constructor.
 WindowBindable (WindowBindable &&) noexcept
 Move constructor.
virtual WindowBindableoperator= (WindowBindable &&) noexcept
 Move assignment operator.
 WindowBindable (const WindowBindable &) noexcept
 Copy constructor.
virtual WindowBindableoperator= (const WindowBindable &) noexcept
 Copy assignment operator.
void bind_window () noexcept
 Bind SDL3 window to this object.
Protected Attributes inherited from galaxy::WindowBindable
SDL_Window * m_window
 Pointer to SDL_Window handle.

Detailed Description

Physical keyboard device and state management.

Definition at line 22 of file Keyboard.hpp.

Constructor & Destructor Documentation

◆ Keyboard() [1/3]

galaxy::Keyboard::Keyboard ( )
noexcept

Constructor.

Definition at line 12 of file Keyboard.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~Keyboard()

galaxy::Keyboard::~Keyboard ( )
noexcept

Destructor.

Definition at line 17 of file Keyboard.cpp.

◆ Keyboard() [2/3]

galaxy::Keyboard::Keyboard ( Keyboard && )
privatedelete

Move constructor.

Here is the call graph for this function:

◆ Keyboard() [3/3]

galaxy::Keyboard::Keyboard ( const Keyboard & )
privatedelete

Copy constructor.

Here is the call graph for this function:

Member Function Documentation

◆ begin_text_input()

void galaxy::Keyboard::begin_text_input ( const SDL_TextInputType input_type,
const SDL_Capitalization capitals,
const bool multiline ) const
noexcept

Enable window to begin processing text input.

Prevents normal key input until disabled.

Parameters
input_typeAn SDL_TextInputType value that describes text being input.
capitalsAn SDL_Capitalization value that describes how text should be capitalized.
multilineTrue if multiple lines of text are allowed.

Definition at line 21 of file Keyboard.cpp.

Here is the caller graph for this function:

◆ end_text_input()

void galaxy::Keyboard::end_text_input ( ) const
noexcept

Disable text input.

Definition at line 36 of file Keyboard.cpp.

Here is the caller graph for this function:

◆ clear_state()

void galaxy::Keyboard::clear_state ( ) const
noexcept

Will clear any existing keyboard state.

Definition at line 41 of file Keyboard.cpp.

Here is the caller graph for this function:

◆ has_keyboard()

bool galaxy::Keyboard::has_keyboard ( ) const
nodiscardnoexcept

Check if there is a keyboard connected.

Returns
True if there is a keyboard connected.

Definition at line 46 of file Keyboard.cpp.

Here is the caller graph for this function:

◆ has_onscreen_keyboard()

bool galaxy::Keyboard::has_onscreen_keyboard ( ) const
nodiscardnoexcept

Check if an onscreen keyboard is supported.

Returns
True if supported.

Definition at line 51 of file Keyboard.cpp.

Here is the caller graph for this function:

◆ onscreen_keyboard_active()

bool galaxy::Keyboard::onscreen_keyboard_active ( ) const
nodiscardnoexcept

Check if onscreen keyboard is shown.

Returns
True if onscreen keyboard is active.

Definition at line 56 of file Keyboard.cpp.

Here is the caller graph for this function:

◆ operator=() [1/2]

Keyboard & galaxy::Keyboard::operator= ( Keyboard && )
privatedelete

Move assignment operator.

Here is the call graph for this function:

◆ operator=() [2/2]

Keyboard & galaxy::Keyboard::operator= ( const Keyboard & )
privatedelete

Copy assignment operator.

Here is the call graph for this function:

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