Horizon
Public Types | Public Member Functions | List of all members
horizon::ToolAlignAndDistribute Class Reference
Inheritance diagram for horizon::ToolAlignAndDistribute:
horizon::ToolBase horizon::ToolHelperSavePlacements horizon::ToolBase

Public Types

enum class  Operation {
  RESET , DISTRIBUTE_ORIGIN_HORIZONTAL , DISTRIBUTE_ORIGIN_VERTICAL , ALIGN_ORIGIN_TOP ,
  ALIGN_ORIGIN_LEFT , ALIGN_ORIGIN_RIGHT , ALIGN_ORIGIN_BOTTOM , ALIGN_BBOX_TOP ,
  ALIGN_BBOX_LEFT , ALIGN_BBOX_RIGHT , ALIGN_BBOX_BOTTOM , DISTRIBUTE_EQUIDISTANT_HORIZONTAL ,
  DISTRIBUTE_EQUIDISTANT_VERTICAL
}
 

Public Member Functions

ToolResponse begin (const ToolArgs &args) override
 Gets called right after the constructor has finished. More...
 
ToolResponse update (const ToolArgs &args) override
 Gets called whenever the user generated some sort of input.
 
bool can_begin () override
 
bool is_specific () override
 
std::set< InToolActionID > get_actions () const override
 
 ToolBase (class IDocument *c, ToolID tid)
 
- Public Member Functions inherited from horizon::ToolBase
 ToolBase (class IDocument *c, ToolID tid)
 
void set_imp_interface (class ImpInterface *i)
 
void set_transient ()
 
virtual void apply_settings ()
 
virtual std::map< ToolID, ToolSettings * > get_all_settings ()
 

Additional Inherited Members

- Public Attributes inherited from horizon::ToolBase
std::set< SelectableRefselection
 
- Protected Types inherited from horizon::ToolHelperSavePlacements
using PlacementPair = decltype(placements)::value_type
 
using Callback = std::function< Placement(const SelectableRef &sel, const PlacementInfo &curr)>
 
using IndexCallback = std::function< int64_t(const SelectableRef &sel, const PlacementInfo &curr)>
 
- Protected Member Functions inherited from horizon::ToolBase
virtual ToolSettingsget_settings ()
 
- Protected Member Functions inherited from horizon::ToolHelperSavePlacements
void save_placements ()
 
void apply_placements (Callback fn)
 
void update_indices (IndexCallback fn)
 
const PlacementPair & get_placement_info_for_index (size_t index) const
 
void reset_placements ()
 
size_t count_types_supported () const
 
- Static Protected Member Functions inherited from horizon::ToolHelperSavePlacements
static bool type_is_supported (ObjectType type)
 
- Protected Attributes inherited from horizon::ToolBase
Documents doc
 
class ImpInterfaceimp = nullptr
 
const ToolID tool_id
 
bool is_transient = false
 
- Protected Attributes inherited from horizon::ToolHelperSavePlacements
std::map< SelectableRef, PlacementInfoplacements
 
std::map< UUID, double > decal_scales
 
std::map< UUID, uint64_t > picture_px_sizes
 

Member Function Documentation

◆ begin()

ToolResponse horizon::ToolAlignAndDistribute::begin ( const ToolArgs args)
overridevirtual

Gets called right after the constructor has finished.

Used to get the initial placement right and set things up. For non-interactive Tools (e.g. DELETE), this one may return ToolResponse::end()

Implements horizon::ToolBase.

◆ can_begin()

bool horizon::ToolAlignAndDistribute::can_begin ( )
overridevirtual
Returns
true if this Tool can begin in sensible way

Reimplemented from horizon::ToolBase.

◆ is_specific()

bool horizon::ToolAlignAndDistribute::is_specific ( )
inlineoverridevirtual
Returns
true if this Tool is specific to the selection

Reimplemented from horizon::ToolBase.


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