FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
fcn::DockArea Class Reference

#include <dockarea.h>

+ Inheritance diagram for fcn::DockArea:
+ Collaboration diagram for fcn::DockArea:

Public Member Functions

 DockArea ()
 
 DockArea (bool active)
 
virtual ~DockArea ()
 
void setActiveDockArea (bool active)
 
bool isActiveDockArea () const
 
void setTopSide (bool side)
 
bool isTopSide () const
 
void setRightSide (bool side)
 
bool isRightSide () const
 
void setBottomSide (bool side)
 
bool isBottomSide () const
 
void setLeftSide (bool side)
 
bool isLeftSide () const
 
void dockWidget (Widget *widget)
 
void undockWidget (Widget *widget)
 
void setHighlighted (bool highlighted)
 
bool isHighlighted () const
 
void setHighlightColor (const Color &color)
 Sets the highlight color of the widget. More...
 
const Color & getHighlightColor () const
 Gets the highlight color. More...
 
void repositionWidget (Widget *widget)
 
virtual void add (Widget *widget)
 
virtual void remove (Widget *widget)
 
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

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

Protected Attributes

bool m_activeDockArea
 
bool m_topSide
 
bool m_rightSide
 
bool m_bottomSide
 
bool m_leftSide
 
bool m_highlighted
 
Color m_highlightColor
 
Color m_savedColor
 
- 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 dockarea.h.

Constructor & Destructor Documentation

◆ DockArea() [1/2]

◆ DockArea() [2/2]

◆ ~DockArea()

fcn::DockArea::~DockArea ( )
virtual

Definition at line 76 of file dockarea.cpp.

Member Function Documentation

◆ add()

void fcn::DockArea::add ( Widget *  widget)
virtual

Definition at line 349 of file dockarea.cpp.

References repositionWidget().

Referenced by dockWidget().

+ Here is the caller graph for this function:

◆ dockWidget()

void fcn::DockArea::dockWidget ( Widget *  widget)

Definition at line 135 of file dockarea.cpp.

References add().

◆ expandContent()

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

◆ getHighlightColor()

const Color & fcn::DockArea::getHighlightColor ( ) const

Gets the highlight color.

Returns
The highlight color.
See also
setHighlightColor

Definition at line 163 of file dockarea.cpp.

References m_highlightColor.

◆ isActiveDockArea()

bool fcn::DockArea::isActiveDockArea ( ) const

Definition at line 83 of file dockarea.cpp.

References m_activeDockArea.

◆ isBottomSide()

bool fcn::DockArea::isBottomSide ( ) const

Definition at line 119 of file dockarea.cpp.

References m_bottomSide.

Referenced by expandContent(), repositionDockAreas(), and resizeToContent().

+ Here is the caller graph for this function:

◆ isHighlighted()

bool fcn::DockArea::isHighlighted ( ) const

Definition at line 155 of file dockarea.cpp.

References m_highlighted.

◆ isLeftSide()

bool fcn::DockArea::isLeftSide ( ) const

Definition at line 131 of file dockarea.cpp.

References m_leftSide.

Referenced by repositionDockAreas().

+ Here is the caller graph for this function:

◆ isRightSide()

bool fcn::DockArea::isRightSide ( ) const

Definition at line 107 of file dockarea.cpp.

References m_rightSide.

Referenced by expandContent(), repositionDockAreas(), and resizeToContent().

+ Here is the caller graph for this function:

◆ isTopSide()

bool fcn::DockArea::isTopSide ( ) const

Definition at line 95 of file dockarea.cpp.

References m_topSide.

Referenced by repositionDockAreas().

+ Here is the caller graph for this function:

◆ keepInBounds()

void fcn::DockArea::keepInBounds ( )
protected

Definition at line 306 of file dockarea.cpp.

References m_bottomSide, m_leftSide, m_rightSide, and m_topSide.

Referenced by repositionDockAreas().

+ Here is the caller graph for this function:

◆ mouseDragged()

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

◆ mouseEntered()

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

Reimplemented from fcn::ResizableWindow.

Definition at line 398 of file dockarea.cpp.

References m_highlighted, and fcn::ResizableWindow::mouseEntered().

◆ mouseExited()

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

Reimplemented from fcn::ResizableWindow.

Definition at line 404 of file dockarea.cpp.

References m_highlighted, and fcn::ResizableWindow::mouseExited().

◆ mouseMoved()

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

Reimplemented from fcn::ResizableWindow.

Definition at line 425 of file dockarea.cpp.

References m_highlighted, and fcn::ResizableWindow::mouseMoved().

◆ mousePressed()

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

Reimplemented from fcn::ResizableWindow.

Definition at line 410 of file dockarea.cpp.

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

◆ mouseReleased()

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

◆ remove()

void fcn::DockArea::remove ( Widget *  widget)
virtual

Definition at line 359 of file dockarea.cpp.

◆ repositionDockAreas()

void fcn::DockArea::repositionDockAreas ( )
protected

Definition at line 228 of file dockarea.cpp.

References isBottomSide(), isLeftSide(), isRightSide(), isTopSide(), and keepInBounds().

Referenced by expandContent(), mouseDragged(), mouseReleased(), and resizeToContent().

+ Here is the caller graph for this function:

◆ repositionWidget()

void fcn::DockArea::repositionWidget ( Widget *  widget)

Definition at line 167 of file dockarea.cpp.

Referenced by add(), fcn::Panel::mouseDragged(), and fcn::Panel::mouseReleased().

+ Here is the caller graph for this function:

◆ resizeToContent()

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

◆ setActiveDockArea()

void fcn::DockArea::setActiveDockArea ( bool  active)

Definition at line 79 of file dockarea.cpp.

References m_activeDockArea.

◆ setBottomSide()

void fcn::DockArea::setBottomSide ( bool  side)

Definition at line 111 of file dockarea.cpp.

References m_bottomSide, and fcn::ResizableWindow::setTopResizable().

◆ setHighlightColor()

void fcn::DockArea::setHighlightColor ( const Color &  color)

Sets the highlight color of the widget.

Parameters
colorThe highlight color.
See also
getHighlightColor

Definition at line 159 of file dockarea.cpp.

References m_highlightColor.

◆ setHighlighted()

void fcn::DockArea::setHighlighted ( bool  highlighted)

Definition at line 143 of file dockarea.cpp.

References m_highlightColor, m_highlighted, and m_savedColor.

◆ setLeftSide()

void fcn::DockArea::setLeftSide ( bool  side)

Definition at line 123 of file dockarea.cpp.

References m_leftSide, and fcn::ResizableWindow::setRightResizable().

◆ setRightSide()

void fcn::DockArea::setRightSide ( bool  side)

Definition at line 99 of file dockarea.cpp.

References m_rightSide, and fcn::ResizableWindow::setLeftResizable().

◆ setTopSide()

void fcn::DockArea::setTopSide ( bool  side)

Definition at line 87 of file dockarea.cpp.

References m_topSide, and fcn::ResizableWindow::setBottomResizable().

◆ undockWidget()

void fcn::DockArea::undockWidget ( Widget *  widget)

Definition at line 139 of file dockarea.cpp.

Member Data Documentation

◆ m_activeDockArea

bool fcn::DockArea::m_activeDockArea
protected

Definition at line 109 of file dockarea.h.

Referenced by isActiveDockArea(), and setActiveDockArea().

◆ m_bottomSide

bool fcn::DockArea::m_bottomSide
protected

Definition at line 113 of file dockarea.h.

Referenced by isBottomSide(), keepInBounds(), and setBottomSide().

◆ m_highlightColor

Color fcn::DockArea::m_highlightColor
protected

Definition at line 118 of file dockarea.h.

Referenced by getHighlightColor(), setHighlightColor(), and setHighlighted().

◆ m_highlighted

bool fcn::DockArea::m_highlighted
protected

◆ m_leftSide

bool fcn::DockArea::m_leftSide
protected

Definition at line 114 of file dockarea.h.

Referenced by isLeftSide(), keepInBounds(), and setLeftSide().

◆ m_rightSide

bool fcn::DockArea::m_rightSide
protected

Definition at line 112 of file dockarea.h.

Referenced by isRightSide(), keepInBounds(), and setRightSide().

◆ m_savedColor

Color fcn::DockArea::m_savedColor
protected

Definition at line 119 of file dockarea.h.

Referenced by setHighlighted().

◆ m_topSide

bool fcn::DockArea::m_topSide
protected

Definition at line 111 of file dockarea.h.

Referenced by isTopSide(), keepInBounds(), and setTopSide().


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