SCV  4.2.1
Simple Components for Visual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
scv::ScrollComponent Class Reference

#include <ScrollComponent.h>

Inheritance diagram for scv::ScrollComponent:
scv::Component scv::SCVCallbacks

Public Member Functions

 ScrollComponent (const scv::Point &p1, const scv::Point &p2, scv::Component *object=NULL)
 
virtual void setComponent (scv::Component *object)
 
scv::ComponentgetComponent (void) const
 
void processMouse (const scv::MouseEvent &evt)
 
void processKey (const scv::KeyEvent &evt)
 
void setHeight (int height)
 
void setWidth (int width)
 
void display (void)
 
- Public Member Functions inherited from scv::Component
 Component (const scv::Point &p1, const scv::Point &p2)
 
virtual ~Component (void)
 
virtual Point getRelativePosition (void) const
 
virtual void setRelativePosition (const Point &position)
 
virtual Point getAbsolutePosition (void) const
 
virtual void setAbsolutePosition (const Point &position)
 
virtual int getWidth (void) const
 
virtual int getHeight (void) const
 
virtual Point getSize (void) const
 
virtual void setSize (int width, int height)
 
virtual void setMinimumSize (const scv::Point &size)
 
virtual Point getMinimumSize (void) const
 
virtual void setPreferredSize (const scv::Point &size)
 
virtual Point getPreferredSize (void) const
 
virtual void setMaximumSize (const scv::Point &size)
 
virtual Point getMaximumSize (void) const
 
virtual bool isOvered (void) const
 
virtual bool isHolded (void) const
 
virtual bool isDragging (void) const
 
virtual bool isResizing (void) const
 
virtual bool isFocused (void) const
 
virtual void setDraggable (bool state)
 
virtual bool isDraggable (void) const
 
virtual void setResizable (bool state)
 
virtual bool isResizable (void) const
 
virtual void setVisible (bool state)
 
virtual bool isVisible (void) const
 
ContextMenugetContextMenu (void) const
 
virtual void registerContextMenu (ContextMenu *contextMenu)
 
virtual void unregisterContextMenu (void)
 
virtual bool isInside (const Point &evtPosition) const
 
virtual bool getCallbacksStatus (void) const
 
virtual void setCallbacksStatus (bool state)
 
virtual Scissor::Info getParentScissor (void) const
 
virtual Scissor::Info getScissor (void) const
 
Type getType (void)
 
void setType (Type type)
 
void setParent (Component *parent)
 
ComponentgetParent (void) const
 
const Component::ListgetChildren (void) const
 
virtual void addChild (Component *object)
 
virtual void removeChild (Component *object)
 
virtual void removeAllChild (void)
 
virtual ComponentgetChild (int index) const
 
void pullChildToTop (Component *child)
 
bool hasChild (Component *child) const
 
- Public Member Functions inherited from scv::SCVCallbacks
virtual ~SCVCallbacks ()
 
virtual void onMouseClick (const scv::MouseEvent &evt)
 
virtual void onMouseHold (const scv::MouseEvent &evt)
 
virtual void onMouseOver (const scv::MouseEvent &evt)
 
virtual void onMouseUp (const scv::MouseEvent &evt)
 
virtual void onMouseWheel (const scv::MouseEvent &evt)
 
virtual void onKeyPressed (const scv::KeyEvent &evt)
 
virtual void onKeyUp (const scv::KeyEvent &evt)
 
virtual void onSizeChange (void)
 
virtual void onPositionChange (void)
 

Protected Types

enum  Button {
  BUT_NONE, BUT_UP, BUT_DOWN, BUT_VERT,
  BUT_LEFT, BUT_RIGHT, BUT_HORZ, BUT_PAGEUP,
  BUT_PAGEDOWN, BUT_PAGELEFT, BUT_PAGERIGHT
}
 
- Protected Types inherited from scv::Component
enum  Side { LEFT, RIGHT, TOP, BOTTOM }
 

Protected Member Functions

virtual void refreshSCrollPaneSize (void)
 
virtual void refreshContainerPosition (void)
 
bool isOnLeftButton (Point p)
 
bool isOnRightButton (Point p)
 
bool isOnUpButton (Point p)
 
bool isOnBottomButton (Point p)
 
bool isOnVertButton (Point p)
 
bool isOnHorzButton (Point p)
 
bool isOnVertBar (Point p)
 
bool isOnHorzBar (Point p)
 
float pixelToFloat (int pix, bool horz)
 
float barPixelToFloat (int pix, bool horz)
 
void createTexture (void)
 
- Protected Member Functions inherited from scv::Component
void setResizingCursor (void)
 
bool isInsideSide (Component::Side side, const Point &evtPosition)
 

Protected Attributes

ComponentTexture_cTexture
 
Button _draggingBar
 
Button _overButton
 
float _translateHeight
 
float _translateWidth
 
int _scrollSizeVertical
 
int _scrollSizeHorizontal
 
int _maxDeslocHeight
 
int _maxDeslocWidth
 
int _containerHeight
 
int _containerWidth
 
int _dragBarOffset
 
Point _minContainerPos
 
bool _holdButton
 
Component_registeredComponent
 
- Protected Attributes inherited from scv::Component
Component_parent
 
Type _type
 
Point _p1
 
Point _p2
 
Point _clickDiff
 
Point _minimumSize
 
Point _preferredSize
 
Point _maximumSize
 
bool _receivingCallbacks
 
bool _isResizable
 
bool _isResizing
 
bool _isHResizable
 
bool _isVResizable
 
bool _isDraggable
 
bool _isDragging
 
bool _isOvered
 
bool _isHolded
 
bool _isVisible
 
std::vector< bool > _resizing
 
ContextMenu_contextMenu
 

Static Protected Attributes

static const int s_initDesloc = 16
 
static const int s_border = 15
 
static const int s_unnecessaryBorder = (3 * s_initDesloc + 1)
 
- Static Protected Attributes inherited from scv::Component
static const int s_mouseBacklash = 4
 

Additional Inherited Members

- Public Types inherited from scv::Component
enum  Type {
  NONE, PANEL, COLORPICKER, PROGRESSBAR,
  SCROLL, SLIDER, SPINNER, BUTTON,
  CHECKBOX, RADIOBUTTON, TOGGLEBUTTON, TEXTFIELD,
  TEXTBOX, SEPARATOR, WINDOW, MENUBAR,
  TABBEDPANE, SCROLLCOMPONENT, IMAGE, TABLE,
  COMBOBOX, CANVAS, TREEVIEW, LABEL,
  CONTEXTMENU, GENERICTREE, NOFWIDGETS
}
 
typedef std::list< Component * > List
 
- Public Attributes inherited from scv::Component
Component::List _children
 

Member Enumeration Documentation

Enumerator:
BUT_NONE 
BUT_UP 
BUT_DOWN 
BUT_VERT 
BUT_LEFT 
BUT_RIGHT 
BUT_HORZ 
BUT_PAGEUP 
BUT_PAGEDOWN 
BUT_PAGELEFT 
BUT_PAGERIGHT 

Constructor & Destructor Documentation

scv::ScrollComponent::ScrollComponent ( const scv::Point p1,
const scv::Point p2,
scv::Component object = NULL 
)

Member Function Documentation

float scv::ScrollComponent::barPixelToFloat ( int  pix,
bool  horz 
)
protected
void scv::ScrollComponent::createTexture ( void  )
protected
void scv::ScrollComponent::display ( void  )
virtual

Implements scv::Component.

scv::Component * scv::ScrollComponent::getComponent ( void  ) const
inline
bool scv::ScrollComponent::isOnBottomButton ( Point  p)
protected
bool scv::ScrollComponent::isOnHorzBar ( Point  p)
protected
bool scv::ScrollComponent::isOnHorzButton ( Point  p)
protected
bool scv::ScrollComponent::isOnLeftButton ( Point  p)
protected
bool scv::ScrollComponent::isOnRightButton ( Point  p)
protected
bool scv::ScrollComponent::isOnUpButton ( Point  p)
protected
bool scv::ScrollComponent::isOnVertBar ( Point  p)
protected
bool scv::ScrollComponent::isOnVertButton ( Point  p)
protected
float scv::ScrollComponent::pixelToFloat ( int  pix,
bool  horz 
)
protected
void scv::ScrollComponent::processKey ( const scv::KeyEvent evt)
virtual

Reimplemented from scv::Component.

void scv::ScrollComponent::processMouse ( const scv::MouseEvent evt)
virtual

Reimplemented from scv::Component.

void scv::ScrollComponent::refreshContainerPosition ( void  )
protectedvirtual
void scv::ScrollComponent::refreshSCrollPaneSize ( void  )
protectedvirtual
void scv::ScrollComponent::setComponent ( scv::Component object)
virtual
void scv::ScrollComponent::setHeight ( int  height)
virtual

Reimplemented from scv::Component.

void scv::ScrollComponent::setWidth ( int  width)
virtual

Reimplemented from scv::Component.

Member Data Documentation

int scv::ScrollComponent::_containerHeight
protected
int scv::ScrollComponent::_containerWidth
protected
ComponentTexture* scv::ScrollComponent::_cTexture
protected
int scv::ScrollComponent::_dragBarOffset
protected
Button scv::ScrollComponent::_draggingBar
protected
bool scv::ScrollComponent::_holdButton
protected
int scv::ScrollComponent::_maxDeslocHeight
protected
int scv::ScrollComponent::_maxDeslocWidth
protected
Point scv::ScrollComponent::_minContainerPos
protected
Button scv::ScrollComponent::_overButton
protected
Component* scv::ScrollComponent::_registeredComponent
protected
int scv::ScrollComponent::_scrollSizeHorizontal
protected
int scv::ScrollComponent::_scrollSizeVertical
protected
float scv::ScrollComponent::_translateHeight
protected
float scv::ScrollComponent::_translateWidth
protected
const int scv::ScrollComponent::s_border = 15
staticprotected
const int scv::ScrollComponent::s_initDesloc = 16
staticprotected
const int scv::ScrollComponent::s_unnecessaryBorder = (3 * s_initDesloc + 1)
staticprotected

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