NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CSeqTextPaneConfig Class Reference

Search Toolkit Book for CSeqTextPaneConfig

#include <gui/widgets/seq_text/seq_text_pane_conf.hpp>

+ Inheritance diagram for CSeqTextPaneConfig:
+ Collaboration diagram for CSeqTextPaneConfig:

Public Types

enum  EFeatureDisplayType { eNone , eAll , eSelected , eMouseOver }
 
typedef CSettingsSet::TFeatSubtype TFeatSubtype
 we use int instead of CSeqFeatData::ESubtype for two reasons: More...
 
- 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< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 CSeqTextPaneConfig (CGuiRegistry *config_cache=0)
 
 ~CSeqTextPaneConfig ()
 
void Reload ()
 uncache any cached data More...
 
void SetCaseFeature (TFeatSubtype subtype)
 
objects::SAnnotSelector * GetCaseFeature ()
 
int GetCaseFeatureSubtype ()
 
bool GetShowFeatAsLower ()
 
void SetShowFeatAsLower (bool show_lower)
 
void SetFontSize (int font_size)
 
int GetFontSize ()
 
void SetShowAbsolutePosition (bool show_abs)
 
bool GetShowAbsolutePosition ()
 
EFeatureDisplayType GetFeatureColorationChoice ()
 
void SetFeatureColorationChoice (EFeatureDisplayType ftype)
 
EFeatureDisplayType GetCodonDrawChoice ()
 
void SetCodonDrawChoice (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 stringGetType (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< stringGetStyleNames (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 &section, 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...
 
CObjectoperator= (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 Member Functions

 CSeqTextPaneConfig (const CSeqTextPaneConfig &)
 
CSeqTextPaneConfigoperator= (const CSeqTextPaneConfig &)
 
EFeatureDisplayType ConfigStringToFeatureDisplayType (string str)
 
const string FeatureDisplayTypeToConfigString (EFeatureDisplayType disp)
 

Private Attributes

objects::SAnnotSelector m_CaseFeatureSel
 

Additional Inherited Members

- Static Public Member Functions inherited from CSettingsSet
static string GetFeatWriteKey (TFeatSubtype feat_subtype, const string &section)
 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 &section) 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...
 

Detailed Description

Definition at line 49 of file seq_text_pane_conf.hpp.

Member Typedef Documentation

◆ TFeatSubtype

we use int instead of CSeqFeatData::ESubtype for two reasons:

  • avoids unnecessary includes
  • gives transparent warning-free compiles with generic serialized code (i.e., when we serialize a subtype, it's as an int not as an enum)

Definition at line 57 of file seq_text_pane_conf.hpp.

Member Enumeration Documentation

◆ EFeatureDisplayType

Enumerator
eNone 
eAll 
eSelected 
eMouseOver 

Definition at line 59 of file seq_text_pane_conf.hpp.

Constructor & Destructor Documentation

◆ CSeqTextPaneConfig() [1/2]

CSeqTextPaneConfig::CSeqTextPaneConfig ( CGuiRegistry config_cache = 0)

Definition at line 57 of file seq_text_pane_conf.cpp.

◆ ~CSeqTextPaneConfig()

CSeqTextPaneConfig::~CSeqTextPaneConfig ( )

Definition at line 63 of file seq_text_pane_conf.cpp.

◆ CSeqTextPaneConfig() [2/2]

CSeqTextPaneConfig::CSeqTextPaneConfig ( const CSeqTextPaneConfig )
private

Member Function Documentation

◆ ConfigStringToFeatureDisplayType()

CSeqTextPaneConfig::EFeatureDisplayType CSeqTextPaneConfig::ConfigStringToFeatureDisplayType ( string  str)
private

◆ FeatureDisplayTypeToConfigString()

const string CSeqTextPaneConfig::FeatureDisplayTypeToConfigString ( CSeqTextPaneConfig::EFeatureDisplayType  disp)
private

◆ GetCaseFeature()

objects::SAnnotSelector * CSeqTextPaneConfig::GetCaseFeature ( )

◆ GetCaseFeatureSubtype()

int CSeqTextPaneConfig::GetCaseFeatureSubtype ( )

◆ GetCodonDrawChoice()

CSeqTextPaneConfig::EFeatureDisplayType CSeqTextPaneConfig::GetCodonDrawChoice ( )

◆ GetFeatureColorationChoice()

CSeqTextPaneConfig::EFeatureDisplayType CSeqTextPaneConfig::GetFeatureColorationChoice ( )

◆ GetFontSize()

int CSeqTextPaneConfig::GetFontSize ( )

Definition at line 117 of file seq_text_pane_conf.cpp.

References CSettingsSet::GetInt(), and kFontSize().

Referenced by CSeqTextConfig::GetFontSize().

◆ GetShowAbsolutePosition()

bool CSeqTextPaneConfig::GetShowAbsolutePosition ( )

◆ GetShowFeatAsLower()

bool CSeqTextPaneConfig::GetShowFeatAsLower ( )

Definition at line 135 of file seq_text_pane_conf.cpp.

References CSettingsSet::GetBool(), and kCaseLower().

Referenced by CSeqTextConfig::GetShowFeatAsLower().

◆ operator=()

CSeqTextPaneConfig& CSeqTextPaneConfig::operator= ( const CSeqTextPaneConfig )
private

◆ Reload()

void CSeqTextPaneConfig::Reload ( void  )

uncache any cached data

Definition at line 68 of file seq_text_pane_conf.cpp.

References CSettingsSet::Uncache().

Referenced by CSeqTextConfig::Reload().

◆ SetCaseFeature()

void CSeqTextPaneConfig::SetCaseFeature ( TFeatSubtype  subtype)

◆ SetCodonDrawChoice()

void CSeqTextPaneConfig::SetCodonDrawChoice ( CSeqTextPaneConfig::EFeatureDisplayType  ftype)

◆ SetFeatureColorationChoice()

void CSeqTextPaneConfig::SetFeatureColorationChoice ( CSeqTextPaneConfig::EFeatureDisplayType  ftype)

◆ SetFontSize()

void CSeqTextPaneConfig::SetFontSize ( int  font_size)

Definition at line 111 of file seq_text_pane_conf.cpp.

References kFontSize(), and CSettingsSet::Set().

Referenced by CSeqTextConfig::SetFontSize().

◆ SetShowAbsolutePosition()

void CSeqTextPaneConfig::SetShowAbsolutePosition ( bool  show_abs)

◆ SetShowFeatAsLower()

void CSeqTextPaneConfig::SetShowFeatAsLower ( bool  show_lower)

Definition at line 141 of file seq_text_pane_conf.cpp.

References kCaseLower(), and CSettingsSet::Set().

Referenced by CSeqTextConfig::SetShowFeatAsLower().

Member Data Documentation

◆ m_CaseFeatureSel

objects::SAnnotSelector CSeqTextPaneConfig::m_CaseFeatureSel
private

Definition at line 101 of file seq_text_pane_conf.hpp.

Referenced by GetCaseFeature(), and SetCaseFeature().


The documentation for this class was generated from the following files:
Modified on Mon Jun 17 05:05:06 2024 by modify_doxy.py rev. 669887