ALBA
albaGUIDialogFindVme.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaGUIDialogFindVme
5 Authors: Paolo Quadrani
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaGUIDialogFindVme_H__
17#define __albaGUIDialogFindVme_H__
18
19//----------------------------------------------------------------------------
20// Include:
21//----------------------------------------------------------------------------
22#include "albaGUIDialog.h"
23
24//----------------------------------------------------------------------------
25// forward declarations
26//----------------------------------------------------------------------------
28class albaVMERoot;
29
33class ALBA_EXPORT albaGUIDialogFindVme : public albaGUIDialog
34{
35public:
36 albaGUIDialogFindVme(const wxString& title, long style = albaCLOSEWINDOW);
38
39 void OnEvent(albaEventBase *alba_event);
40
43
45 bool FindNextNode(const char *text);
46
48 void MetchCase(bool mc = false) {m_MatchCase = mc;};
49
51 void WholeWord(bool ww = false) {m_WholeWord = ww;};
52
53protected:
55 albaVME *FindInTreeByName(albaVME *node, const char *name, bool match_case = true, bool whole_word = true);
56
59
66 std::vector<albaVME*> m_NodeFoundList;
67};
68#endif
@ albaCLOSEWINDOW
Definition: albaGUIDialog.h:34
Implementation of the message object for the Subject/Observer design pattern.
Definition: albaEventBase.h:49
class Name : albaGUICheckTree.
albaGUIDialogFindVme - a dialog widget with a find VME GUI.
std::vector< albaVME * > m_NodeFoundList
bool AlreadyFound(albaVME *n)
Check if a node has been found yet.
albaVME * FindInTreeByName(albaVME *node, const char *name, bool match_case=true, bool whole_word=true)
Find a node in all the subtrees matching the given VME Name.
albaGUIDialogFindVme(const wxString &title, long style=albaCLOSEWINDOW)
albaGUICheckTree * m_Tree
The VME tree.
int m_MatchCase
Enable the case sensitive search.
albaString m_SearchString
The string to find into the VME tree.
void OnEvent(albaEventBase *alba_event)
process the events sent by subjects
bool FindNextNode(const char *text)
Useful for initialize the search string or to use it by code.
void MetchCase(bool mc=false)
Set the flag for the case sensitive search.
void SetTree(albaGUICheckTree *tree)
Set the tree on which find the VME.
void WholeWord(bool ww=false)
Set the flag for searching node with the whole word matching.
albaGUI * m_Gui
Gui variable used to plug custom widgets.
virtual ~albaGUIDialogFindVme()
int m_WholeWord
Enable the find only for exact matching VME names.
albaGUIDialog is the base class for albaDialogs.
Definition: albaGUIDialog.h:76
albaGUI is a panel with function to easily create GUI.
Definition: albaGUI.h:110
albaString - performs common string operations on c-strings.
Definition: albaString.h:43
albaVMERoot - a VME is the root of a tree of VME nodes.
Definition: albaVMERoot.h:35
albaVME -
Definition: albaVME.h:150