Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Colors::Manager Class Reference

#include <manager.h>

Public Member Functions

std::vector< std::shared_ptr< Space::AnySpace > > spaces (Space::Traits traits)
 
std::shared_ptr< Space::AnySpacefind (Space::Type type) const
 Finds the first global color space matching the given type.
 
std::shared_ptr< Space::AnySpacefind (std::string const &name) const
 Finds the global space matching the given name.
 

Static Public Member Functions

static Managerget ()
 

Protected Member Functions

 Manager ()
 
 ~Manager ()=default
 
std::shared_ptr< Space::AnySpaceaddSpace (Space::AnySpace *space)
 Add the given space and assume ownership over it.
 
bool removeSpace (std::shared_ptr< Space::AnySpace > space)
 Removes the given space from the list of available spaces.
 

Private Member Functions

 Manager (Manager const &)=delete
 
void operator= (Manager const &)=delete
 

Private Attributes

std::vector< std::shared_ptr< Space::AnySpace > > _spaces
 

Detailed Description

Definition at line 28 of file manager.h.

Constructor & Destructor Documentation

◆ Manager() [1/2]

Inkscape::Colors::Manager::Manager ( Manager const &  )
privatedelete

◆ Manager() [2/2]

Inkscape::Colors::Manager::Manager ( )
protected

Definition at line 41 of file manager.cpp.

References addSpace().

◆ ~Manager()

Inkscape::Colors::Manager::~Manager ( )
protecteddefault

Member Function Documentation

◆ addSpace()

std::shared_ptr< Space::AnySpace > Inkscape::Colors::Manager::addSpace ( Space::AnySpace space)
protected

Add the given space and assume ownership over it.

Definition at line 67 of file manager.cpp.

References _spaces, find(), and Inkscape::Colors::Space::AnySpace::getType().

Referenced by Manager().

◆ find() [1/2]

std::shared_ptr< Space::AnySpace > Inkscape::Colors::Manager::find ( Space::Type  type) const

Finds the first global color space matching the given type.

  • type - The type enum to match

Definition at line 97 of file manager.cpp.

References _spaces.

Referenced by addSpace(), Inkscape::Colors::Space::CMS::toRGBA(), and Inkscape::Colors::xml_to_paint().

◆ find() [2/2]

std::shared_ptr< Space::AnySpace > Inkscape::Colors::Manager::find ( std::string const &  name) const

Finds the global space matching the given name.

  • name - The name of the space as given by getName

Definition at line 108 of file manager.cpp.

References _spaces, and name.

◆ get()

◆ operator=()

void Inkscape::Colors::Manager::operator= ( Manager const &  )
privatedelete

◆ removeSpace()

bool Inkscape::Colors::Manager::removeSpace ( std::shared_ptr< Space::AnySpace space)
protected

Removes the given space from the list of available spaces.

Definition at line 79 of file manager.cpp.

References _spaces.

◆ spaces()

std::vector< std::shared_ptr< Space::AnySpace > > Inkscape::Colors::Manager::spaces ( Space::Traits  traits)

Definition at line 84 of file manager.cpp.

References _spaces.

Referenced by Inkscape::UI::Widget::ColorNotebook::_initUI().

Member Data Documentation

◆ _spaces

std::vector<std::shared_ptr<Space::AnySpace> > Inkscape::Colors::Manager::_spaces
private

Definition at line 56 of file manager.h.

Referenced by addSpace(), find(), find(), removeSpace(), and spaces().


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