FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
fcn::Panel Class Reference

#include <panel.h>

+ Inheritance diagram for fcn::Panel:
+ Collaboration diagram for fcn::Panel:

Classes

struct  SavedState
 

Public Member Functions

 Panel ()
 
 Panel (bool dockable)
 
virtual ~Panel ()
 
void setDockable (bool dockable)
 Sets if the widget is dockable. More...
 
bool isDockable () const
 Gets if the widget is dockable. More...
 
void setDocked (bool docked)
 Sets if the widget is docked. More...
 
bool isDocked () const
 Gets if the widget is docked. More...
 
virtual DockAreafindDockArea ()
 
virtual void resizeToContent (bool recursiv=true)
 
virtual void expandContent (bool recursiv=true)
 
virtual void mouseEntered (MouseEvent &mouseEvent)
 
virtual void mouseExited (MouseEvent &mouseEvent)
 
virtual void mousePressed (MouseEvent &mouseEvent)
 
virtual void mouseReleased (MouseEvent &mouseEvent)
 
virtual void mouseMoved (MouseEvent &mouseEvent)
 
virtual void mouseDragged (MouseEvent &mouseEvent)
 
- Public Member Functions inherited from fcn::ResizableWindow
 ResizableWindow ()
 
 ResizableWindow (bool resizable)
 
 ResizableWindow (const std::string &caption, bool resizable=true)
 
virtual ~ResizableWindow ()
 
void setResizableBorderDistance (int32_t border)
 Sets the size of the area that is active for resize events. More...
 
int32_t getResizableBorderDistance () const
 Gets the size of the area that is active for resize events. More...
 
void setResizable (bool resizable)
 Sets if the widget is resizable. More...
 
bool isResizable () const
 Gets if the widget is resizable. More...
 
void setTopResizable (bool resizable)
 Sets if the widget is resizable at top. More...
 
bool isTopResizable () const
 Gets if the widget is resizable at top. More...
 
void setRightResizable (bool resizable)
 Sets if the widget is resizable at right. More...
 
bool isRightResizable () const
 Gets if the widget is resizable at right. More...
 
void setBottomResizable (bool resizable)
 Sets if the widget is resizable at bottom. More...
 
bool isBottomResizable () const
 Gets if the widget is resizable at bottom. More...
 
void setLeftResizable (bool resizable)
 Sets if the widget is resizable at left. More...
 
bool isLeftResizable () const
 Gets if the widget is resizable at left. More...
 
void setShove (bool shove)
 Sets if the widget should be pushed if the size reaches the minimum. More...
 
bool getShove () const
 Gets if the widget should be pushed if the size reaches the minimum. More...
 
void set (CursorDirections direction, uint32_t cursor_id=0)
 Sets the mouse cursor for the specified direction. More...
 
void set (CursorDirections direction, FIFE::ImagePtr image)
 Sets the mouse cursor type to image for the specified direction. More...
 
void set (CursorDirections direction, FIFE::AnimationPtr anim)
 Sets the mouse cursor type to animation for the specified direction. More...
 
FIFE::MouseCursorType getType (CursorDirections direction) const
 Gets the mouse cursor type for the specified direction. More...
 
uint32_t getId (CursorDirections direction) const
 Gets the mouse cursor handle for the specified direction. More...
 
FIFE::ImagePtr getImage (CursorDirections direction)
 Gets the mouse image for the specified direction. More...
 
FIFE::AnimationPtr getAnimation (CursorDirections direction)
 Gets the mouse animation for the specified direction. More...
 
virtual void focusLost (const Event &event)
 

Protected Member Functions

DockAreagetDockedArea ()
 
- Protected Member Functions inherited from fcn::ResizableWindow
void initCursors ()
 
void restoreCursor ()
 
void saveCursor ()
 

Protected Attributes

bool m_dockable
 
bool m_docked
 
SavedState m_state
 
- Protected Attributes inherited from fcn::ResizableWindow
FIFE::Cursorm_cursor
 
int32_t m_borderDistance
 
bool m_resizable
 
bool m_resizableTop
 
bool m_resizableRight
 
bool m_resizableBottom
 
bool m_resizableLeft
 
bool m_resizing
 
bool m_resizeTop
 
bool m_resizeRight
 
bool m_resizeBottom
 
bool m_resizeLeft
 
bool m_shove
 
CursorState m_saved
 
std::vector< CursorStatem_cursors
 

Additional Inherited Members

- Public Types inherited from fcn::ResizableWindow
enum  CursorDirections {
  CURSOR_DIRECTION_L = 0, CURSOR_DIRECTION_R = 1, CURSOR_DIRECTION_T = 2, CURSOR_DIRECTION_B = 5,
  CURSOR_DIRECTION_LT = 3, CURSOR_DIRECTION_RT = 4, CURSOR_DIRECTION_LB = 6, CURSOR_DIRECTION_RB = 7
}
 

Detailed Description

Definition at line 38 of file panel.h.

Constructor & Destructor Documentation

◆ Panel() [1/2]

fcn::Panel::Panel ( )

Definition at line 39 of file panel.cpp.

◆ Panel() [2/2]

fcn::Panel::Panel ( bool  dockable)

Definition at line 44 of file panel.cpp.

◆ ~Panel()

fcn::Panel::~Panel ( )
virtual

Definition at line 49 of file panel.cpp.

Member Function Documentation

◆ expandContent()

void fcn::Panel::expandContent ( bool  recursiv = true)
virtual

Definition at line 155 of file panel.cpp.

References fcn::ResizableWindow::resizeToContent().

◆ findDockArea()

DockArea * fcn::Panel::findDockArea ( )
virtual

Definition at line 103 of file panel.cpp.

References isDocked().

◆ getDockedArea()

DockArea * fcn::Panel::getDockedArea ( )
protected

Definition at line 95 of file panel.cpp.

References isDocked().

Referenced by mouseDragged(), mouseReleased(), and setDocked().

+ Here is the caller graph for this function:

◆ isDockable()

bool fcn::Panel::isDockable ( ) const

Gets if the widget is dockable.

Returns
True if the widget should be dockable, otherwise false.

Definition at line 57 of file panel.cpp.

References m_dockable.

Referenced by setDocked().

+ Here is the caller graph for this function:

◆ isDocked()

bool fcn::Panel::isDocked ( ) const

Gets if the widget is docked.

Returns
True if the widget is docked, otherwise false.

Definition at line 91 of file panel.cpp.

References m_docked.

Referenced by findDockArea(), getDockedArea(), and setDocked().

+ Here is the caller graph for this function:

◆ mouseDragged()

void fcn::Panel::mouseDragged ( MouseEvent &  mouseEvent)
virtual

◆ mouseEntered()

void fcn::Panel::mouseEntered ( MouseEvent &  mouseEvent)
virtual

Reimplemented from fcn::ResizableWindow.

Definition at line 159 of file panel.cpp.

References fcn::ResizableWindow::mouseEntered().

◆ mouseExited()

void fcn::Panel::mouseExited ( MouseEvent &  mouseEvent)
virtual

Reimplemented from fcn::ResizableWindow.

Definition at line 163 of file panel.cpp.

References fcn::ResizableWindow::mouseExited().

◆ mouseMoved()

void fcn::Panel::mouseMoved ( MouseEvent &  mouseEvent)
virtual

Reimplemented from fcn::ResizableWindow.

Definition at line 194 of file panel.cpp.

References fcn::ResizableWindow::mouseMoved().

◆ mousePressed()

void fcn::Panel::mousePressed ( MouseEvent &  mouseEvent)
virtual

Reimplemented from fcn::ResizableWindow.

Definition at line 167 of file panel.cpp.

References m_docked, and fcn::ResizableWindow::mousePressed().

◆ mouseReleased()

void fcn::Panel::mouseReleased ( MouseEvent &  mouseEvent)
virtual

◆ resizeToContent()

void fcn::Panel::resizeToContent ( bool  recursiv = true)
virtual

Reimplemented from fcn::ResizableWindow.

Definition at line 147 of file panel.cpp.

References m_docked, and fcn::ResizableWindow::resizeToContent().

◆ setDockable()

void fcn::Panel::setDockable ( bool  dockable)

Sets if the widget is dockable.

Parameters
dockableTrue if the widget should be dockable, otherwise false.

Definition at line 53 of file panel.cpp.

References m_dockable.

◆ setDocked()

void fcn::Panel::setDocked ( bool  docked)

Sets if the widget is docked.

Parameters
dockedTrue if the widget is docked, otherwise false.

Definition at line 61 of file panel.cpp.

References fcn::Panel::SavedState::dimension, getDockedArea(), isDockable(), isDocked(), fcn::ResizableWindow::isResizable(), m_docked, m_state, fcn::Panel::SavedState::movable, fcn::Panel::SavedState::resizable, and fcn::ResizableWindow::setResizable().

Member Data Documentation

◆ m_dockable

bool fcn::Panel::m_dockable
protected

Definition at line 91 of file panel.h.

Referenced by isDockable(), and setDockable().

◆ m_docked

bool fcn::Panel::m_docked
protected

Definition at line 93 of file panel.h.

Referenced by isDocked(), mouseDragged(), mousePressed(), mouseReleased(), resizeToContent(), and setDocked().

◆ m_state

SavedState fcn::Panel::m_state
protected

Definition at line 101 of file panel.h.

Referenced by setDocked().


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