NCBI C++ ToolKit
|
Search Toolkit Book for CSeqTextConfig
#include <gui/widgets/seq_text/seq_text_conf.hpp>
Public Member Functions | |
CSeqTextConfig (CGuiRegistry *config_cache=0) | |
~CSeqTextConfig () | |
void | Reload () |
uncache any cached data More... | |
bool | GetShow (int subtype) const |
CRgbaColor * | GetColor (int subtype) const |
CSettingsSet & | SetContentConf () |
void | SetShow (objects::CSeqFeatData::ESubtype subtype, bool show) |
void | SetColor (objects::CSeqFeatData::ESubtype subtype, CRgbaColor color) |
void | SetCaseFeature (objects::CSeqFeatData::ESubtype subtype) |
int | GetCaseFeatureSubtype () |
objects::SAnnotSelector * | GetCaseFeature () |
bool | GetShowFeatAsLower () |
void | SetShowFeatAsLower (bool show_lower) |
void | SetFontSize (int font_size) |
int | GetFontSize () |
void | SetShowAbsolutePosition (bool show_abs) |
bool | GetShowAbsolutePosition () |
CSeqTextPaneConfig::EFeatureDisplayType | GetFeatureColorationChoice () |
void | SetFeatureColorationChoice (CSeqTextPaneConfig::EFeatureDisplayType ftype) |
CSeqTextPaneConfig::EFeatureDisplayType | GetCodonDrawChoice () |
void | SetCodonDrawChoice (CSeqTextPaneConfig::EFeatureDisplayType ftype) |
Public Member Functions inherited from CSettingsSet | |
CSettingsSet (const string &type, CGuiRegistry *registry=0) | |
constructor More... | |
virtual | ~CSettingsSet () |
void | Uncache () |
uncache any cached lookup data More... | |
const string & | GetType (void) const |
Return the type passed in the constructor. More... | |
string | GetCurrentStyleName (void) const |
void | SetCurrentStyleName (const string &new_style) |
void | SetDefaultCurrentStyle () |
These are so that you can get data that is all default values. More... | |
void | RestoreCurrentStyle () |
string | GetTypeDescription (void) const |
list< string > | GetStyleNames (void) const |
Methods to edit our list of valid styles. More... | |
string | AddStyle (void) |
these all return the name of the style just added. More... | |
string | DuplicateStyle (const string &style) |
string | RenameStyle (const string &old_style, const string &new_style) |
bool | CanRenameStyle (const string &style) |
bool | DeleteStyle (const string &style) |
bool | Delete (const string &key) |
Delete a key/value in the current settings. More... | |
string | GetFeatReadKey (TFeatSubtype feat_subtype, const string §ion, const string &subkey=kEmptyStr) const |
retrieve the key name to read values for a given feature subtype More... | |
void | DumpAll (CNcbiOstream &ostr) |
write all keys and values we know about. More... | |
string | GetCurrentStyleKey (void) const |
style keys are only for internal use. More... | |
void | SetCurrentStyleKey (const string &new_style_key) |
string | GetString (const string &key, const string &default_val=kEmptyStr) const |
Retrieve a named string value from a section.key. More... | |
int | GetInt (const string &key, int default_val=0) const |
Retrieve a named int value from a section.key. More... | |
double | GetReal (const string &key, double default_val=0) const |
Retrieve a named double value from a section.key. More... | |
bool | GetBool (const string &key, bool default_val=false) const |
Retrieve a named bool value from a section.key. More... | |
CRgbaColor | GetColor (const string &key, const CRgbaColor &default_val=CRgbaColor()) const |
Retrieve a named color value from a section.key. More... | |
void | GetIntVec (const string &key, vector< int > &val) const |
Retrieve a named int vector value from a section.key. More... | |
void | GetRealVec (const string &key, vector< double > &val) const |
Retrieve a named real vector value from a section.key. More... | |
void | GetStringVec (const string &key, vector< string > &val) const |
Retrieve a named string vector value from a section.key. More... | |
void | Set (const string &key, int val) |
set a named integer value More... | |
void | Set (const string &key, double val) |
set a named real value More... | |
void | Set (const string &key, bool val) |
set a named bool value More... | |
void | Set (const string &key, const string &val) |
ste a named string value More... | |
void | Set (const string &key, const char *val) |
set a named string value as a const char* (avoids implicit conversion to bool) More... | |
void | Set (const string &key, const vector< int > &val) |
set a named value as a vector of ints More... | |
void | Set (const string &key, const vector< double > &val) |
set a named value as a vector of reals More... | |
void | Set (const string &key, const vector< string > &val) |
set a named value as a vector of strings More... | |
void | Set (const string &key, const CRgbaColor &val) |
set a named value as a color More... | |
Public Member Functions inherited from CObject | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
Public Member Functions inherited from CDebugDumpable | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
Private Types | |
typedef map< TFeatSubtype, CRgbaColor > | TFeatColorMap |
cached colors by feature subtype More... | |
Private Member Functions | |
CSeqTextConfig (const CSeqTextConfig &) | |
CSeqTextConfig & | operator= (const CSeqTextConfig &) |
Private Attributes | |
CSeqTextPaneConfig | m_PaneConfig |
TFeatColorMap | m_FeatColors |
Additional Inherited Members | |
Public Types inherited from CSettingsSet | |
typedef int | TFeatSubtype |
we use int instead of CSeqFeatData::ESubtype for two reasons: More... | |
Public Types inherited from CObject | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Static Public Member Functions inherited from CSettingsSet | |
static string | GetFeatWriteKey (TFeatSubtype feat_subtype, const string §ion) |
retrieve the key name to write values for a given feature subtype More... | |
static void | ColorToUserField (const CRgbaColor &c, objects::CUser_field &f) |
convert a color into a vector of ints within a user field More... | |
static bool | UserFieldToColor (const objects::CUser_field &f, CRgbaColor &c) |
convert a user field into a color. More... | |
Static Public Member Functions inherited from CObject | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
Static Public Member Functions inherited from CDebugDumpable | |
static void | EnableDebugDump (bool on) |
Static Public Attributes inherited from CSettingsSet | |
static const string | kDefaultDelim |
must be the same used as a default in CGuiRegistry. More... | |
Static Public Attributes inherited from CObject | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
Protected Member Functions inherited from CSettingsSet | |
string | x_GetStyleName (const string &key) const |
every style has a name and a key. More... | |
string | x_GetStyleKey (const string &name) const |
string | x_MakeUniqueStyleName (const string &name) const |
make unique names and keys. More... | |
string | x_MakeUniqueStyleKey (const string &key) const |
CRegistryReadView | x_GetReadView (const string §ion) const |
Retrieve a read-only view. More... | |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Static Protected Attributes inherited from CSettingsSet | |
static const string | sm_DefaultValuesKey |
the key for the default set of values. More... | |
Definition at line 50 of file seq_text_conf.hpp.
|
private |
cached colors by feature subtype
Definition at line 96 of file seq_text_conf.hpp.
CSeqTextConfig::CSeqTextConfig | ( | CGuiRegistry * | config_cache = 0 | ) |
Definition at line 43 of file seq_text_conf.cpp.
CSeqTextConfig::~CSeqTextConfig | ( | ) |
Definition at line 49 of file seq_text_conf.cpp.
|
private |
objects::SAnnotSelector * CSeqTextConfig::GetCaseFeature | ( | ) |
Definition at line 112 of file seq_text_conf.cpp.
References CSeqTextPaneConfig::GetCaseFeature(), and m_PaneConfig.
Referenced by CSeqTextPane::OnCopy(), and CSequenceTextGraph::x_RenderSequence().
int CSeqTextConfig::GetCaseFeatureSubtype | ( | ) |
Definition at line 105 of file seq_text_conf.cpp.
References CSeqTextPaneConfig::GetCaseFeatureSubtype(), and m_PaneConfig.
Referenced by CSeqTextPane::GetCaseFeatureSubtype().
CSeqTextPaneConfig::EFeatureDisplayType CSeqTextConfig::GetCodonDrawChoice | ( | ) |
Definition at line 165 of file seq_text_conf.cpp.
References CSeqTextPaneConfig::GetCodonDrawChoice(), and m_PaneConfig.
Referenced by CSeqTextDlg::CSeqTextDlg(), CSeqTextPane::STG_RenderFeatureExtras(), CSeqTextPane::STG_RenderMouseOverFeature(), CSeqTextPane::STG_RenderSelectedFeature(), CwxSeqTextViewOptions::x_LoadSettings(), and CSeqTextPane::x_RenderContent().
CRgbaColor * CSeqTextConfig::GetColor | ( | int | subtype | ) | const |
Definition at line 68 of file seq_text_conf.cpp.
References _ASSERT, color, map_checker< Container >::end(), map_checker< Container >::find(), CSettingsSet::GetColor(), CSettingsSet::GetFeatReadKey(), kColorsKey(), kEmptyStr, and m_FeatColors.
Referenced by CSequenceTextGraph::x_DrawVariations(), and CSequenceTextGraph::x_GetColors().
CSeqTextPaneConfig::EFeatureDisplayType CSeqTextConfig::GetFeatureColorationChoice | ( | ) |
Definition at line 153 of file seq_text_conf.cpp.
References CSeqTextPaneConfig::GetFeatureColorationChoice(), and m_PaneConfig.
Referenced by CSeqTextDlg::CSeqTextDlg(), CSeqTextDataSourceInterval::GetFeatureData(), CwxSeqTextViewOptions::x_LoadSettings(), and CSequenceTextGraph::x_RenderSequence().
int CSeqTextConfig::GetFontSize | ( | ) |
Definition at line 123 of file seq_text_conf.cpp.
References CSeqTextPaneConfig::GetFontSize(), and m_PaneConfig.
Referenced by CSeqTextPane::Configure(), CSeqTextDlg::CSeqTextDlg(), CSeqTextPane::GetFontSize(), and CwxSeqTextViewOptions::x_LoadSettings().
Definition at line 62 of file seq_text_conf.cpp.
References CSettingsSet::GetBool(), CSettingsSet::GetFeatReadKey(), kEmptyStr, and kShowKey().
Referenced by CSeqTextDataSourceInterval::GetFeatureData().
bool CSeqTextConfig::GetShowAbsolutePosition | ( | ) |
Definition at line 135 of file seq_text_conf.cpp.
References CSeqTextPaneConfig::GetShowAbsolutePosition(), and m_PaneConfig.
Referenced by CSeqTextPane::Configure(), CSeqTextDlg::CSeqTextDlg(), CSeqTextPane::GetShowAbsolutePosition(), CSeqTextPane::STG_ReportMouseOverPos(), and CwxSeqTextViewOptions::x_LoadSettings().
bool CSeqTextConfig::GetShowFeatAsLower | ( | ) |
Definition at line 141 of file seq_text_conf.cpp.
References CSeqTextPaneConfig::GetShowFeatAsLower(), and m_PaneConfig.
Referenced by CSeqTextDlg::CSeqTextDlg(), CSeqTextPane::GetShowFeaturesInLowerCase(), CSeqTextPane::OnCopy(), and CSequenceTextGraph::x_RenderSequence().
|
private |
void CSeqTextConfig::Reload | ( | void | ) |
uncache any cached data
Definition at line 54 of file seq_text_conf.cpp.
References map_checker< Container >::clear(), m_FeatColors, m_PaneConfig, CSeqTextPaneConfig::Reload(), and CSettingsSet::Uncache().
Referenced by CSeqTextPane::ReloadSettings().
void CSeqTextConfig::SetCaseFeature | ( | objects::CSeqFeatData::ESubtype | subtype | ) |
Definition at line 99 of file seq_text_conf.cpp.
References m_PaneConfig, and CSeqTextPaneConfig::SetCaseFeature().
Referenced by CSeqTextPane::ChooseCaseFeature().
void CSeqTextConfig::SetCodonDrawChoice | ( | CSeqTextPaneConfig::EFeatureDisplayType | ftype | ) |
Definition at line 171 of file seq_text_conf.cpp.
References m_PaneConfig, and CSeqTextPaneConfig::SetCodonDrawChoice().
Referenced by CSeqTextDlg::x_OnOK(), and CwxSeqTextViewOptions::x_SaveSettings().
void CSeqTextConfig::SetColor | ( | objects::CSeqFeatData::ESubtype | subtype, |
CRgbaColor | color | ||
) |
Definition at line 92 of file seq_text_conf.cpp.
References color, CSettingsSet::GetFeatWriteKey(), kColorsKey(), CSettingsSet::kDefaultDelim, kEmptyStr, and CSettingsSet::Set().
CSettingsSet& CSeqTextConfig::SetContentConf | ( | ) |
void CSeqTextConfig::SetFeatureColorationChoice | ( | CSeqTextPaneConfig::EFeatureDisplayType | ftype | ) |
Definition at line 159 of file seq_text_conf.cpp.
References m_PaneConfig, and CSeqTextPaneConfig::SetFeatureColorationChoice().
Referenced by CSeqTextDlg::x_OnOK(), and CwxSeqTextViewOptions::x_SaveSettings().
void CSeqTextConfig::SetFontSize | ( | int | font_size | ) |
Definition at line 117 of file seq_text_conf.cpp.
References m_PaneConfig, and CSeqTextPaneConfig::SetFontSize().
Referenced by CSeqTextPane::SetFontSize(), CSeqTextDlg::x_OnOK(), and CwxSeqTextViewOptions::x_SaveSettings().
void CSeqTextConfig::SetShow | ( | objects::CSeqFeatData::ESubtype | subtype, |
bool | show | ||
) |
Definition at line 85 of file seq_text_conf.cpp.
References b, CSettingsSet::GetFeatWriteKey(), CSettingsSet::kDefaultDelim, kEmptyStr, kShowKey(), and CSettingsSet::Set().
void CSeqTextConfig::SetShowAbsolutePosition | ( | bool | show_abs | ) |
Definition at line 129 of file seq_text_conf.cpp.
References m_PaneConfig, and CSeqTextPaneConfig::SetShowAbsolutePosition().
Referenced by CSeqTextDlg::x_OnOK(), and CwxSeqTextViewOptions::x_SaveSettings().
void CSeqTextConfig::SetShowFeatAsLower | ( | bool | show_lower | ) |
Definition at line 147 of file seq_text_conf.cpp.
References m_PaneConfig, and CSeqTextPaneConfig::SetShowFeatAsLower().
Referenced by CSeqTextPane::ShowFeaturesInLowerCase(), CSeqTextPane::ShowFeaturesInUpperCase(), and CSeqTextDlg::x_OnOK().
|
mutableprivate |
Definition at line 97 of file seq_text_conf.hpp.
Referenced by GetColor(), and Reload().
|
private |
Definition at line 93 of file seq_text_conf.hpp.
Referenced by GetCaseFeature(), GetCaseFeatureSubtype(), GetCodonDrawChoice(), GetFeatureColorationChoice(), GetFontSize(), GetShowAbsolutePosition(), GetShowFeatAsLower(), Reload(), SetCaseFeature(), SetCodonDrawChoice(), SetFeatureColorationChoice(), SetFontSize(), SetShowAbsolutePosition(), and SetShowFeatAsLower().