AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
ASplitterHelper Class Reference

Classes

struct  Item
 

Public Member Functions

 ASplitterHelper (ALayoutDirection direction)
 
void setDirection (ALayoutDirection direction)
 
void beginDrag (const glm::ivec2 &mousePos)
 
bool mouseDrag (const glm::ivec2 &mousePos)
 
void endDrag ()
 
const AVector< Item > & items () const
 
void setItems (AVector< Item > items)
 
void setItems (const AVector< _< AView > > &items)
 
bool isDragging () const
 
bool isDraggingArea (glm::ivec2 position)
 
int reclaimSpace (int space, size_t dividerIndex)
 Reclaims space via specified divider index. More...
 
int reclaimSpace (int space)
 Reclaims space via the last divider. More...
 

Friends

class ASplitter
 

Member Function Documentation

◆ reclaimSpace() [1/2]

int ASplitterHelper::reclaimSpace ( int  space)
inline

Reclaims space via the last divider.

Parameters
spacespace to reclaim in px. Cannot be zero.
Returns
space argument but reduced (abs) by amount of space successfully reclaimed.

Negative space reclaims space from the left direction of dividerIndex, positive space reclaims space from the right direction of dividerIndex.

◆ reclaimSpace() [2/2]

int ASplitterHelper::reclaimSpace ( int  space,
size_t  dividerIndex 
)

Reclaims space via specified divider index.

Parameters
spacespace to reclaim in px. Cannot be zero.
dividerIndexdivider index.
Returns
space argument but reduced (abs) by amount of space successfully reclaimed.

Negative space reclaims space from the left direction of dividerIndex, positive space reclaims space from the right direction of dividerIndex.


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