Lysa  0.0
Lysa 3D Engine
Line Class Reference

Detailed Description

A horizontal or vertical line

+ Inheritance diagram for Line:

Public Types

enum  LineStyle { HORIZ, VERT }
 
- Public Types inherited from Widget
enum  Type {
  WIDGET, PANEL, BOX, LINE,
  FRAME, BUTTON, TOGGLEBUTTON, TEXT,
  TEXTEDIT, SCROLLBAR, TREEVIEW, IMAGE
}
 Widget type. More...
 
enum  AlignmentType {
  NONE, FILL, CENTER, HCENTER,
  VCENTER, TOP, BOTTOM, LEFT,
  RIGHT, TOPCENTER, BOTTOMCENTER, LEFTCENTER,
  RIGHTCENTER, TOPLEFT, BOTTOMLEFT, BOTTOMRIGHT,
  TOPRIGHT, LEFTTOP, LEFTBOTTOM, RIGHTBOTTOM,
  RIGHTTOP, CORNERTOPLEFT, CORNERTOPRIGHT, CORNERBOTTOMLEFT,
  CORNERBOTTOMRIGHT
}
 Widget placement (relative to the parent widget) More...
 

Public Member Functions

 Line (LineStyle style=HORIZ)
 
auto getStyle () const
 
void setStyle (LineStyle style)
 
- Public Member Functions inherited from Widget
 Widget (Type=WIDGET)
 
 ~Widget () override = default
 
Type getType () const
 
bool isVisible () const
 
void show (bool show=true)
 
bool isEnabled () const
 
void enable (bool isEnabled=true)
 
void setPos (float x, float y)
 
float getWidth () const
 
float getHeight () const
 
virtual void setSize (float width, float height)
 
const RectgetRect () const
 
void setRect (float x, float y, float width, float height)
 
void setRect (const Rect &rect)
 
AlignmentType getAlignment () const
 
void setAlignment (AlignmentType alignment)
 
std::shared_ptr< FontgetFont () const
 
void setFont (const std::shared_ptr< Font > &font)
 
float getFontScale () const
 
virtual void setFontScale (float fontScale)
 
bool isFocused () const
 
Widget * getParent () const
 
template<typename T >
std::shared_ptr< T > add (std::shared_ptr< T > child, const AlignmentType alignment, const std::string &resource="", const bool overlap=false)
 
virtual void remove (const std::shared_ptr< Widget > &child)
 
virtual void removeAll ()
 
void setPadding (float padding)
 
float getPadding () const
 
float getVBorder () const
 
float getHBorder () const
 
void setVBorder (float size)
 
void setHBorder (float size)
 
bool isDrawBackground () const
 
void setDrawBackground (bool drawBackground)
 
bool isPushed () const
 
bool isPointed () const
 
bool isFreezed () const
 
bool isRedrawOnMouseEvent () const
 
bool isOverlapping () const
 
Rect getChildrenRect () const
 
void setFreezed (const bool f)
 
void setPushed (const bool p)
 
void refresh () const
 
void setResource (std::shared_ptr< Resource >)
 
uint32 getGroupIndex () const
 
void setGroupIndex (int32 index)
 
void * getUserData () const
 
void setUserData (void *data)
 
float getTransparency () const
 
void setTransparency (float alpha)
 
void resizeChildren ()
 
Widget * setFocus (bool=true)
 
virtual void eventCreate ()
 
virtual void eventDestroy ()
 
virtual void eventShow ()
 
virtual void eventHide ()
 
virtual void eventEnable ()
 
virtual void eventDisable ()
 
virtual void eventMove (float x, float y)
 
virtual void eventResize ()
 
virtual bool eventKeyDown (Key key)
 
virtual bool eventKeyUp (Key key)
 
virtual bool eventMouseDown (MouseButton button, float x, float y)
 
virtual bool eventMouseUp (MouseButton button, float x, float y)
 
virtual bool eventMouseMove (uint32, float x, float y)
 
virtual void eventGotFocus ()
 
virtual void eventLostFocus ()
 
- Public Member Functions inherited from Object
void connect (const Signal::signal &name, const Signal::Handler &handler)
 
void connect (const Signal::signal &name, const std::function< void ()> &handler)
 
void emit (const Signal::signal &name, void *params=nullptr)
 
virtual std::string toString () const
 
 Object () = default
 
virtual ~Object () = default
 

Additional Inherited Members

- Protected Member Functions inherited from Widget
void allowingFocus (bool allow=true)
 
- Protected Attributes inherited from Widget
const Type type
 
Rect rect
 
Rect defaultRect
 
float hborder {0}
 
float vborder {0}
 
float padding {0}
 
bool overlap {false}
 
bool focused {false}
 
bool allowFocus {false}
 
bool allowChildren {true}
 
bool drawBackground {true}
 
bool moveChildrenOnPush {false}
 
bool redrawOnMouseEvent {false}
 
bool redrawOnMouseMove {false}
 
float transparency {1.0f}
 
Widget * parent {nullptr}
 
AlignmentType alignment {NONE}
 
std::shared_ptr< Resourceresource
 
std::list< std::shared_ptr< Widget > > children
 
Windowwindow {nullptr}
 
void * style {nullptr}
 
bool mouseMoveOnFocus {false}
 
float fontScale {0.0f}
 

Member Enumeration Documentation

enum LineStyle
Enum ValuesDocumentation
HORIZ 
VERT 

Constructor & Destructor Documentation

Line ( LineStyle  style = HORIZ)

Member Function Documentation

auto getStyle ( ) const
inline
void setStyle ( LineStyle  style)