Skip to content

Commit 4450422

Browse files
committed
Getting access to known color palettes to allow selection in the GTK UI
1 parent 0c4ca93 commit 4450422

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Src/DasherCore/ColorIO.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ void CColorIO::GetKnownPalettes(std::vector<std::string>* ColourList) const {
2424
}
2525
}
2626

27+
const std::map<std::string, ColorPalette *>* CColorIO::GetKnownPalettes() const {
28+
return &KnownPalettes;
29+
}
30+
2731
const ColorPalette* CColorIO::FindPalette(const std::string& ColorPaletteName) {
2832
if(ColorPaletteName.empty()){ // return Default if no colour scheme is specified
2933
return HardcodedDefaultPalette;

Src/DasherCore/ColorIO.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace Dasher {
1717
CColorIO(CMessageDisplay *pMsgs);
1818
~CColorIO() override;
1919
void GetKnownPalettes(std::vector<std::string>* ColourList) const;
20+
const std::map<std::string, ColorPalette *>* GetKnownPalettes() const;
2021

2122
const ColorPalette* FindPalette(const std::string& ColorPaletteName);
2223

Src/DasherCore/DasherInterfaceBase.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ class Dasher::CDasherInterfaceBase : public CMessageDisplay, private NoClones {
105105

106106
void GetPermittedValues(Parameter parameter, std::vector<std::string> &vList);
107107

108+
CColorIO* GetColorIO(){return m_ColorIO;}
109+
108110
//@}
109111

110112
/// Called when a parameter changes - but *after* components have been notified.

0 commit comments

Comments
 (0)