Pioneer
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
Gui::Screen Class Reference

#include <GuiScreen.h>

Collaboration diagram for Gui::Screen:
Collaboration graph
[legend]

Public Member Functions

friend Widget::~Widget ()
 

Static Public Member Functions

static void Init (Graphics::Renderer *renderer, int real_width, int real_height, int ui_width, int ui_height)
 
static void Uninit ()
 
static void Draw ()
 
static void AddBaseWidget (Widget *w, int x, int y)
 
static void RemoveBaseWidget (Widget *w)
 
static void OnMouseMotion (SDL_MouseMotionEvent *e)
 
static void OnClick (SDL_MouseButtonEvent *e)
 
static void OnKeyDown (const SDL_Keysym *sym)
 
static void OnKeyUp (const SDL_Keysym *sym)
 
static void OnTextInput (const SDL_TextInputEvent *e)
 
static void EnterOrtho ()
 
static void LeaveOrtho ()
 
static int GetWidth ()
 
static int GetHeight ()
 
static bool Project (const vector3d &in, vector3d &out)
 
static bool IsBaseWidget (const Widget *)
 
static void GetCoords2Pixels (float scale[2])
 
static const float * GetCoords2Pixels ()
 
static void SetFocused (Widget *w, bool enableKeyRepeat=false)
 
static void ClearFocus ()
 
static bool IsFocused (Widget *w)
 
static void PushFont (RefCountedPtr< Text::TextureFont > font)
 
static void PushFont (std::string name)
 
static void PopFont ()
 
static RefCountedPtr< Text::TextureFontGetFont ()
 
static RefCountedPtr< Text::TextureFontGetDefaultFont ()
 
static float GetFontHeight (Text::TextureFont *font=0)
 
static float GetFontDescender (Text::TextureFont *font=0)
 
static void RenderStringBuffer (RefCountedPtr< Graphics::VertexBuffer > vb, const std::string &s, float xoff, float yoff, const Color &color=Color::WHITE, Text::TextureFont *font=0)
 
static void RenderMarkupBuffer (RefCountedPtr< Graphics::VertexBuffer > vb, const std::string &s, const Color &color=Color::WHITE, Text::TextureFont *font=0)
 
static void MeasureString (const std::string &s, float &w, float &h, Text::TextureFont *font=0)
 
static int PickCharacterInString (const std::string &s, float x, float y, Text::TextureFont *font=0)
 
static void MeasureCharacterPos (const std::string &s, int charIndex, float &x, float &y, Text::TextureFont *font=0)
 
static Graphics::RendererGetRenderer ()
 

Static Public Attributes

static Graphics::RenderStatealphaBlendState = nullptr
 
static Graphics::MaterialflatColorMaterial = nullptr
 

Friends

void Widget::SetShortcut (SDL_Keycode key, SDL_Keymod mod)
 

Constructor & Destructor Documentation

◆ Widget::~Widget()

Gui::Screen::Widget::~Widget ( )

Member Function Documentation

◆ AddBaseWidget()

void Gui::Screen::AddBaseWidget ( Widget w,
int  x,
int  y 
)
static
Here is the call graph for this function:

◆ ClearFocus()

void Gui::Screen::ClearFocus ( )
static

◆ Draw()

void Gui::Screen::Draw ( )
static
Here is the call graph for this function:

◆ EnterOrtho()

void Gui::Screen::EnterOrtho ( )
static
Here is the call graph for this function:

◆ GetCoords2Pixels() [1/2]

static const float* Gui::Screen::GetCoords2Pixels ( )
inlinestatic

◆ GetCoords2Pixels() [2/2]

static void Gui::Screen::GetCoords2Pixels ( float  scale[2])
inlinestatic

◆ GetDefaultFont()

static RefCountedPtr<Text::TextureFont> Gui::Screen::GetDefaultFont ( )
inlinestatic

◆ GetFont()

static RefCountedPtr<Text::TextureFont> Gui::Screen::GetFont ( )
inlinestatic

◆ GetFontDescender()

float Gui::Screen::GetFontDescender ( Text::TextureFont font = 0)
static
Here is the call graph for this function:

◆ GetFontHeight()

float Gui::Screen::GetFontHeight ( Text::TextureFont font = 0)
static
Here is the call graph for this function:

◆ GetHeight()

static int Gui::Screen::GetHeight ( )
inlinestatic

◆ GetRenderer()

static Graphics::Renderer* Gui::Screen::GetRenderer ( )
inlinestatic

◆ GetWidth()

static int Gui::Screen::GetWidth ( )
inlinestatic

◆ Init()

void Gui::Screen::Init ( Graphics::Renderer renderer,
int  real_width,
int  real_height,
int  ui_width,
int  ui_height 
)
static
Here is the call graph for this function:

◆ IsBaseWidget()

bool Gui::Screen::IsBaseWidget ( const Widget w)
static

◆ IsFocused()

static bool Gui::Screen::IsFocused ( Widget w)
inlinestatic

◆ LeaveOrtho()

void Gui::Screen::LeaveOrtho ( )
static
Here is the call graph for this function:

◆ MeasureCharacterPos()

void Gui::Screen::MeasureCharacterPos ( const std::string &  s,
int  charIndex,
float &  x,
float &  y,
Text::TextureFont font = 0 
)
static
Here is the call graph for this function:

◆ MeasureString()

void Gui::Screen::MeasureString ( const std::string &  s,
float &  w,
float &  h,
Text::TextureFont font = 0 
)
static
Here is the call graph for this function:

◆ OnClick()

void Gui::Screen::OnClick ( SDL_MouseButtonEvent *  e)
static
Here is the call graph for this function:

◆ OnKeyDown()

void Gui::Screen::OnKeyDown ( const SDL_Keysym *  sym)
static
Here is the call graph for this function:

◆ OnKeyUp()

void Gui::Screen::OnKeyUp ( const SDL_Keysym *  sym)
static

◆ OnMouseMotion()

void Gui::Screen::OnMouseMotion ( SDL_MouseMotionEvent *  e)
static
Here is the call graph for this function:

◆ OnTextInput()

void Gui::Screen::OnTextInput ( const SDL_TextInputEvent *  e)
static
Here is the call graph for this function:

◆ PickCharacterInString()

int Gui::Screen::PickCharacterInString ( const std::string &  s,
float  x,
float  y,
Text::TextureFont font = 0 
)
static
Here is the call graph for this function:

◆ PopFont()

static void Gui::Screen::PopFont ( )
inlinestatic

◆ Project()

bool Gui::Screen::Project ( const vector3d in,
vector3d out 
)
static
Here is the call graph for this function:

◆ PushFont() [1/2]

static void Gui::Screen::PushFont ( RefCountedPtr< Text::TextureFont font)
inlinestatic

◆ PushFont() [2/2]

static void Gui::Screen::PushFont ( std::string  name)
inlinestatic
Here is the call graph for this function:

◆ RemoveBaseWidget()

void Gui::Screen::RemoveBaseWidget ( Widget w)
static
Here is the call graph for this function:

◆ RenderMarkupBuffer()

void Gui::Screen::RenderMarkupBuffer ( RefCountedPtr< Graphics::VertexBuffer vb,
const std::string &  s,
const Color color = Color::WHITE,
Text::TextureFont font = 0 
)
static
Here is the call graph for this function:

◆ RenderStringBuffer()

void Gui::Screen::RenderStringBuffer ( RefCountedPtr< Graphics::VertexBuffer vb,
const std::string &  s,
float  xoff,
float  yoff,
const Color color = Color::WHITE,
Text::TextureFont font = 0 
)
static
Here is the call graph for this function:

◆ SetFocused()

void Gui::Screen::SetFocused ( Widget w,
bool  enableKeyRepeat = false 
)
static
Here is the call graph for this function:

◆ Uninit()

void Gui::Screen::Uninit ( )
static
Here is the call graph for this function:

Friends And Related Function Documentation

◆ Widget::SetShortcut

void Widget::SetShortcut ( SDL_Keycode  key,
SDL_Keymod  mod 
)
friend

Member Data Documentation

◆ alphaBlendState

Graphics::RenderState * Gui::Screen::alphaBlendState = nullptr
static

◆ flatColorMaterial

Graphics::Material * Gui::Screen::flatColorMaterial = nullptr
static

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