| 
    Plutonium framework API 1.0.0
    
   Easy-to-use, SDL2-based UI framework for Nintendo Switch homebrew 
   | 
 
Element for text rendering. More...
#include <elm_TextBlock.hpp>
  
Public Member Functions | |
| TextBlock (const i32 x, const i32 y, const std::string &text) | |
| Creates a new instance of a TextBlock element.   | |
| ~TextBlock () | |
| i32 | GetX () override | 
| Gets the X position of the Element.   | |
| void | SetX (const i32 x) | 
| Sets the X position of the TextBlock.   | |
| i32 | GetY () override | 
| Gets the Y position of the Element.   | |
| void | SetY (const i32 y) | 
| Sets the Y position of the TextBlock.   | |
| i32 | GetWidth () override | 
| Gets the width of the Element.   | |
| i32 | GetHeight () override | 
| Gets the height of the Element.   | |
| std::string | GetText () | 
| Gets the text of the TextBlock.   | |
| void | SetText (const std::string &text) | 
| Sets the text of the TextBlock.   | |
| void | SetFont (const std::string &font_name) | 
| Gets the font name of the TextBlock.   | |
| void | SetColor (const Color clr) | 
| Sets the color of the TextBlock.   | |
| void | ResetClamp () | 
| Resets the clamping of the TextBlock.   | |
| void | OnRender (render::Renderer::Ref &drawer, const i32 x, const i32 y) override | 
| Renders the Element on the screen.   | |
| void | OnInput (const u64 keys_down, const u64 keys_up, const u64 keys_held, const TouchPoint touch_pos) override | 
| Called before rendering the Element in order to handle input.   | |
  Public Member Functions inherited from pu::ui::elm::Element | |
| Element () | |
| Creates a new instance of an Element.   | |
| virtual | ~Element () | 
| bool | IsVisible () | 
| Gets whether the Element is visible.   | |
| void | SetVisible (const bool visible) | 
| Sets whether the Element is visible.   | |
| void | SetHorizontalAlign (const HorizontalAlign align) | 
| Sets the horizontal alignment of the Element.   | |
| HorizontalAlign | GetHorizontalAlign () | 
| Gets the horizontal alignment of the Element.   | |
| void | SetVerticalAlign (const VerticalAlign align) | 
| Sets the vertical alignment of the Element.   | |
| VerticalAlign | GetVerticalAlign () | 
| Gets the vertical alignment of the Element.   | |
| void | SetParentContainer (Container *parent_container) | 
| Sets the parent Container of the Element.   | |
| i32 | GetProcessedX () | 
| Gets the actual X position of the Element, considering the parent Container (depends on alignment).   | |
| i32 | GetProcessedY () | 
| Gets the actual Y position of the Element, considering the parent Container (depends on alignment).   | |
Static Public Attributes | |
| static constexpr Color | DefaultColor = { 0, 0, 0, 0xFF } | 
| static constexpr i32 | DefaultClampSpeedSteps = 3 | 
| static constexpr i32 | DefaultClampStaticDelaySteps = 20 | 
| static constexpr i32 | NoClamp = -1 | 
Additional Inherited Members | |
  Protected Attributes inherited from pu::ui::elm::Element | |
| bool | visible | 
| HorizontalAlign | h_align | 
| VerticalAlign | v_align | 
| Container * | parent_container | 
Element for text rendering.
| pu::ui::elm::TextBlock::~TextBlock | ( | ) | 
      
  | 
  overridevirtual | 
      
  | 
  inline | 
      
  | 
  overridevirtual | 
      
  | 
  inlineoverridevirtual | 
Gets the X position of the Element.
Implements pu::ui::elm::Element.
      
  | 
  inlineoverridevirtual | 
Gets the Y position of the Element.
Implements pu::ui::elm::Element.
      
  | 
  inlineoverridevirtual | 
Called before rendering the Element in order to handle input.
| keys_down | Keys that are currently being pressed. | 
| keys_up | Keys that are currently being released. | 
| keys_held | Keys that are currently held. | 
| touch_pos | Position of the touch on the screen. | 
Implements pu::ui::elm::Element.
      
  | 
  overridevirtual | 
Renders the Element on the screen.
| drawer | Renderer to use for rendering. | 
| x | X position to render the Element. | 
| y | Y position to render the Element. | 
Implements pu::ui::elm::Element.
      
  | 
  inline | 
Resets the clamping of the TextBlock.
| void pu::ui::elm::TextBlock::SetColor | ( | const Color | clr | ) | 
| void pu::ui::elm::TextBlock::SetFont | ( | const std::string & | font_name | ) | 
| void pu::ui::elm::TextBlock::SetText | ( | const std::string & | text | ) | 
      
  | 
  inline | 
Sets the X position of the TextBlock.
| x | New X position. | 
      
  | 
  inline | 
Sets the Y position of the TextBlock.
| y | New Y position. | 
      
  | 
  staticconstexpr | 
      
  | 
  staticconstexpr | 
      
  | 
  staticconstexpr | 
      
  | 
  staticconstexpr |