A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/pt__project__item_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/core/pt_project_item.cpp Source File

50 #include <wx/treectrl.h> 56 static const char

*

kDlgRegPath

=

"Dialogs.PT.EditProjectItem"

;

62  if

((**it).IsComment()){

65

descr += (*it)->GetComment();

73

list< CRef<objects::CAnnotdesc> >& annots = item.SetDescr();

74

list<CRef<objects::CAnnotdesc> >::iterator it = annots.begin();

76  for

(; it != annots.end();) {

77  if

((**it).IsComment())

78

it = annots.erase(it);

85  ITERATE

(list<string>, iter, comment) {

88

annot->SetComment(*iter);

89

item.SetDescr().push_back(annot);

96

wxColour cl_text = treeCtrl.GetForegroundColour();

97

wxColour cl_back = treeCtrl.GetBackgroundColour();

98

wxColour clr =

GetData

()->IsEnabled() ? cl_text :

GetAverage

(cl_text, cl_back, 0.5);

108  if

( gui_info.

IsNull

() )

return

;

110  string

alias = gui_info->GetIcon();

118

treeCtrl.SetItemImage(

m_TreeItemId

, index, wxTreeItemIcon_Normal);

125  if

(!project)

return false

;

129  if

(!doc)

return false

;

131

objects::CProjectItem* pr_item =

GetData

();

132  if

(!pr_item)

return false

;

136  if

(!pt_folder)

return false

;

138

objects::CProjectFolder& parent_folder = *pt_folder->

GetData

();

146

dlg.

SetDescr

(wxString::FromUTF8(descr.c_str()));

152  if

(dlg.ShowModal() == wxID_OK) {

155  if

(new_label !=

label

|| new_descr != descr) {

156

new_label = doc->MakeUniqueItemLabel(new_label);

157

pr_item->SetLabel(new_label);

161  if

(new_label !=

label

&& pr_item->IsSetItem() && pr_item->GetItem().IsAnnot()) {

162

pr_item->SetItem().SetAnnot().SetNameDesc(new_label);

166

doc->SetDirty(

true

);

180  if

(event.IsEditCancelled())

186  if

(!project)

return false

;

190  if

(!doc)

return false

;

192

objects::CProjectItem* pr_item =

GetData

();

193  if

(!pr_item)

return false

;

196  string

oldName = pr_item->GetLabel();

197  if

(oldName == new_name)

200

objects::CProjectFolder* parent_folder = 0;

203

parent_folder = parent->

GetData

();

209  if

(!validator.

IsValid

(new_name, err)) {

213

pr_item->SetLabel(new_name);

216

doc->SetDirty (

true

);

226  if

(!project)

return false

;

230  if

(!doc)

return false

;

233  if

(!parent)

return false

;

238

treeCtrl.Delete(toDelete);

248  return

parent->

CanPaste

(treeCtrl);

256  return

parent->

Paste

(treeCtrl, items, move);

User-defined methods of the data storage class.

virtual void SetRegistryPath(const string &path)

void SetDescr(wxString value)

wxString GetFolderName() const

wxString GetDescr() const

void SetNameValidator(IFNameValidator *validator)

void SetFolderName(wxString value)

void SetDataObject(const CSerialObject *object, objects::CScope *scope)

bool RemoveProjectItem(objects::CProjectItem *item)

virtual bool IsValid(const string &name, string &err)

virtual bool Paste(wxTreeCtrl &, vector< CItem * > &, bool)

virtual bool CanPaste(wxTreeCtrl &) const

wxString GetLabel(wxTreeCtrl &treeCtrl) const

wxTreeItemId m_TreeItemId

CItem * GetParent(wxTreeCtrl &treeCtrl) const

static CPTIcons & GetInstance()

int GetImageIndex(EIcon icon) const

virtual void BeginLabelEdit(wxTreeCtrl &treeCtrl, wxTreeEvent &event)

virtual bool DoProperties(wxTreeCtrl &treeCtrl)

void Initialize(wxTreeCtrl &treeCtrl, CGBDocument &doc)

virtual bool CanPaste(wxTreeCtrl &treeCtrl) const

virtual bool EndLabelEdit(wxTreeCtrl &treeCtrl, wxTreeEvent &event)

virtual bool Paste(wxTreeCtrl &treeCtrl, PT::TItems &items, bool move)

virtual bool DoRemove(wxTreeCtrl &treeCtrl)

void UpdateLabel(wxTreeCtrl &treeCtrl)

const CRef< objects::CProjectItem > & GetData() const

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

void NcbiErrorBox(const string &message, const string &title="Error")

specialized Message Box function for reporting critical errors

void Post(CRef< CEvent > evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)

Handles an event asynchronously (process and/or dispatch).

bool IsNull(void) const THROWS_NONE

Check if pointer is null – same effect as Empty().

TObjectType & GetObject(void)

Get object.

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)

Split a string using specified delimiters.

@ fSplit_Tokenize

All delimiters are merged and trimmed, to get non-empty tokens only.

static const char label[]

CProject * GetProject(wxTreeCtrl &treeCtrl, const CItem &item)

static string s_ProjectItemGetDescr(const objects::CProjectItem &item)

static void s_ProjectItemSetDescr(objects::CProjectItem &item, const string &decsr)

static const char * kDlgRegPath

wxString ToWxString(const string &s)

string ToStdString(const wxString &s)

wxColour GetAverage(const wxColor &c1, const wxColor &c2, double ratio)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4