wex v24.04.0
Public Types | Public Member Functions | List of all members
wex::stc_undo Class Reference

Offers a simple class to enforce several undo like actions on an stc component. More...

#include <wex/factory/stc-undo.h>

Public Types

enum  { UNDO_ACTION = 0 , UNDO_POS , UNDO_SEL_NONE }
 Undo flags. More...
 
typedef std::bitset< 3 > undo_t
 A typedef containing undo flags.
 

Public Member Functions

 stc_undo (wex::factory::stc *stc, undo_t type=undo_t().set(UNDO_ACTION))
 Constructor, depending on the type will start an action.
 
 ~stc_undo ()
 Destructor, will restore the actions taken.
 
undo_t type () const
 Returns type.
 

Detailed Description

Offers a simple class to enforce several undo like actions on an stc component.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Undo flags.

Enumerator
UNDO_ACTION 

enforce Begin, End UndoAction

UNDO_POS 

enforce position_save, position_restore

UNDO_SEL_NONE 

enforce if no selection at cons, also at destruct

Constructor & Destructor Documentation

◆ stc_undo()

wex::stc_undo::stc_undo ( wex::factory::stc * stc,
undo_t type = undo_t().set(UNDO_ACTION) )

Constructor, depending on the type will start an action.

Parameters
stcthe stc component
typethe kind of undo