NCBI C++ ToolKit
ui_object.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: ui_object.cpp 38453 2017-05-10 20:46:05Z evgeniev $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Andrey Yazhuk
27  *
28  */
29 
30 #include <ncbi_pch.hpp>
31 
32 #include <gui/utils/ui_object.hpp>
33 
34 
36 
37 
38 ///////////////////////////////////////////////////////////////////////////////
39 /// CUIObject
41  const string& image_alias,
42  const string& hint,
43  const string& description,
44  const string& help_id,
45  const string& log_event)
46 : m_Label(label),
47  m_IconAlias(image_alias),
48  m_Hint(hint),
49  m_Description(description),
50  m_HelpId(help_id),
51  m_LogEvent(log_event)
52 {
53 }
54 
55 
57 : m_Label(cmd.m_Label),
58  m_IconAlias(cmd.m_IconAlias),
59  m_Hint(cmd.m_Hint),
60  m_Description(cmd.m_Description),
61  m_HelpId(cmd.m_HelpId),
62  m_LogEvent(cmd.m_LogEvent)
63 {
64 }
65 
66 
68 {
69 }
70 
71 
72 void CUIObject::Init(const string& label,
73  const string& image_alias,
74  const string& hint,
75  const string& description,
76  const string& help_id,
77  const string& log_event)
78 {
79  m_Label = label;
80  m_IconAlias = image_alias;
81  m_Hint = hint;
82  m_Description = description;
83  m_HelpId = help_id;
84  m_LogEvent = log_event;
85 }
86 
87 
88 void CUIObject::SetLabel(const string& label)
89 {
90  m_Label = label;
91 }
92 
93 
94 void CUIObject::SetIconAlias(const string& alias)
95 {
96  m_IconAlias = alias;
97 }
98 
99 
100 void CUIObject::SetHint(const string& hint)
101 {
102  m_Hint = hint;
103 }
104 
105 
106 void CUIObject::SetDescription(const string& descr)
107 {
108  m_Description = descr;
109 }
110 
111 
112 void CUIObject::SetHelpId(const string& help_id)
113 {
114  m_HelpId = help_id;
115 }
116 
117 
118 void CUIObject::SetLogEvent(const string& log_event)
119 {
120  m_LogEvent = log_event;
121 }
122 
123 
124 const string& CUIObject::GetLabel() const
125 {
126  return m_Label;
127 }
128 
129 
130 const string& CUIObject::GetIconAlias() const
131 {
132  return m_IconAlias;
133 }
134 
135 
136 const string& CUIObject::GetHint() const
137 {
138  return m_Hint;
139 }
140 
141 
142 const string& CUIObject::GetDescription() const
143 {
144  return m_Description;
145 }
146 
147 
148 const string& CUIObject::GetHelpId() const
149 {
150  return m_HelpId;
151 }
152 
153 
154 const string& CUIObject::GetLogEvent() const
155 {
156  return m_LogEvent;
157 }
158 
159 
CUIObject - default mix-in implementation of IUIObject.
Definition: ui_object.hpp:81
static CS_COMMAND * cmd
Definition: ct_dynamic.c:26
virtual void SetLabel(const string &label)
Definition: ui_object.cpp:88
virtual const string & GetLogEvent() const
Definition: ui_object.cpp:154
virtual const string & GetDescription() const
Definition: ui_object.cpp:142
string m_Hint
Definition: ui_object.hpp:116
string m_Label
Definition: ui_object.hpp:114
virtual const string & GetHint() const
Definition: ui_object.cpp:136
virtual void SetHint(const string &hint)
Definition: ui_object.cpp:100
virtual void Init(const string &label, const string &icon_alias, const string &hint=kEmptyStr, const string &description=kEmptyStr, const string &help_id=kEmptyStr, const string &log_event=kEmptyStr)
Definition: ui_object.cpp:72
virtual const string & GetIconAlias() const
Definition: ui_object.cpp:130
virtual void SetIconAlias(const string &alias)
Definition: ui_object.cpp:94
virtual const string & GetHelpId() const
Definition: ui_object.cpp:148
string m_HelpId
Definition: ui_object.hpp:118
virtual ~CUIObject()
Definition: ui_object.cpp:67
virtual void SetLogEvent(const string &log_event)
Definition: ui_object.cpp:118
virtual const string & GetLabel() const
Definition: ui_object.cpp:124
string m_IconAlias
Definition: ui_object.hpp:115
virtual void SetDescription(const string &descr)
Definition: ui_object.cpp:106
string m_LogEvent
Definition: ui_object.hpp:119
string m_Description
Definition: ui_object.hpp:117
CUIObject(const string &label, const string &icon_alias, const string &hint=kEmptyStr, const string &description=kEmptyStr, const string &help_id=kEmptyStr, const string &log_event=kEmptyStr)
CUIObject.
Definition: ui_object.cpp:40
virtual void SetHelpId(const string &help_id)
Definition: ui_object.cpp:112
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
static const char label[]
Modified on Tue Apr 16 20:14:51 2024 by modify_doxy.py rev. 669887