CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxNoteEditorConfig.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2022 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18#include <memory>
19#include "DDKERNEL.h"
20
22using CFxNoteEditorConfigPtr = std::shared_ptr< CFxNoteEditorConfig>;
23
28{
29public:
31
32public:
35
37
42 {
43 //1st row
45 kConfigurableFunction_StartRow1 = kConfigurableFunction_Start,//0
46 kConfigurableFunction_TextStyle = kConfigurableFunction_Start,//0
61 kConfigurableFunction_EndRow1 = kConfigurableFunction_Help,//14
62
63 //2nd row
65 kConfigurableFunction_Undo = kConfigurableFunction_StartRow2,//15
89 kConfigurableFunction_EndRow2 = kConfigurableFunction_Close,//38
90 kConfigurableFunction_Count//
91 };
92
94 {
95 kConfigurableMenu_Start = 1,//1
96 kConfigurableMenu_FindAndReplace = kConfigurableMenu_Start,//1
100 kConfigurableMenu_Count
101 };
102
103public:
104 virtual int GetSpacePosition() const;
105 virtual void SetSpacePositon( const int newPos );
106
107 virtual bool GetConfigurableFunction( const EConfigurableFunction kFunction ) const;
108 virtual bool GetConfigurableFunction( const int iFunction ) const;
109 virtual void SetConfigurableFunction( const EConfigurableFunction kFunction, const bool bIsDisplayed );
110 virtual void SetConfigurableFunction( const int iFunction, const bool bIsDisplayed );
111
112 virtual bool GetMoreMenu( const EConfigurableMenu kMenuFunction ) const;
113 virtual bool GetMoreMenu( const int iMenuFunction ) const;
114 virtual void SetMoreMenu( const EConfigurableMenu kMenuFunction, const bool bIsDisplayed );
115 virtual void SetMoreMenu( const int iMenuFunction, const bool bIsDisplayed );
116
117 //1st row (0) or 2nd row (1)
118 virtual int GetRowPosition( const EConfigurableFunction kFunction ) const;
119 virtual int GetRowPosition( const int iFunction ) const;
120 virtual void SetRowPosition( const EConfigurableFunction kFunction, const int rowPosition );
121 virtual void SetRowPosition( const int iFunction, const int rowPosition );
122
123 virtual void SetDefault();
124
125private:
126 //spacePosition=-1 - space widget is disabled
127 int m_iSpacePosition = -1;
128 bool m_configurableFunctions[ EConfigurableFunction::kConfigurableFunction_Count ];
129 bool m_moreMenu[ EConfigurableMenu::kConfigurableMenu_Count ];
130 int m_rowPosition[ EConfigurableFunction::kConfigurableFunction_Count ];//1st row (0) or 2nd row (1)
131};
132
#define DDKERNEL_API
Definition: DDKERNEL.h:32
std::shared_ptr< CFxNoteEditorConfig > CFxNoteEditorConfigPtr
virtual ~CFxNoteEditorConfig()
virtual bool GetMoreMenu(const int iMenuFunction) const
virtual bool GetConfigurableFunction(const int iFunction) const
virtual bool GetMoreMenu(const EConfigurableMenu kMenuFunction) const
virtual void SetRowPosition(const int iFunction, const int rowPosition)
void InitConfigOf(const CFxNoteEditorConfig &)
virtual void SetConfigurableFunction(const EConfigurableFunction kFunction, const bool bIsDisplayed)
virtual int GetRowPosition(const int iFunction) const
virtual bool GetConfigurableFunction(const EConfigurableFunction kFunction) const
virtual int GetRowPosition(const EConfigurableFunction kFunction) const
static CFxNoteEditorConfigPtr DefaultConfig()
virtual void SetMoreMenu(const int iMenuFunction, const bool bIsDisplayed)
virtual void SetConfigurableFunction(const int iFunction, const bool bIsDisplayed)
virtual void SetRowPosition(const EConfigurableFunction kFunction, const int rowPosition)
virtual void SetDefault()
virtual void SetMoreMenu(const EConfigurableMenu kMenuFunction, const bool bIsDisplayed)
virtual void SetSpacePositon(const int newPos)
virtual int GetSpacePosition() const