VR-Forces 4.10 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvCore
DtMenuPath.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2008 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#ifndef DtMenuPath_H_
11
#define DtMenuPath_H_
12
13
#include <
vrvCore/vrvCore.h
>
14
#include <string>
15
16
namespace
makVrv
17
{
18
27
class
DT_DLL_VRVCORE
DtMenuPath
28
{
29
public
:
30
31
//Internal class which is used to ensure that it is not possible to incorrectly
32
//build a menu path.
33
struct
DT_DLL_VRVCORE
MenuPathBuilder
34
{
35
public
:
36
friend
class
DtMenuPath
;
37
38
//Add a menu to the path.
39
MenuPathBuilder
menu(
const
std::string& name)
const
;
40
43
DtMenuPath
item(
const
std::string& name)
const
;
44
47
DtMenuPath
operator/(
const
std::string& name)
const
;
48
50
DtMenuPath
separator(
const
std::string& name)
const
;
51
52
protected
:
53
54
//Access the path.
55
inline
const
std::string&
path
()
const
{
return
myPath; }
56
57
//The CTOR this class is automatically created by the DtMenuPath.
58
MenuPathBuilder
(
const
std::string& name);
59
60
std::string
myPath
;
61
};
62
63
//Useful CTOR.
64
DtMenuPath
(
const
MenuPathBuilder
& builder);
65
67
DtMenuPath
(
const
DtMenuPath
& copy);
68
69
//Create an empty menu path.
70
static
DtMenuPath
empty();
71
72
//Create an empty root menu path.
73
static
DtMenuPath
root();
74
75
//Create an empty popup menu path.
76
static
DtMenuPath
popup();
77
78
//Start a main menu.
79
static
MenuPathBuilder
mainMenu(
const
std::string& name);
80
81
//Start a popup menu.
82
static
MenuPathBuilder
popupMenu(
const
std::string& name );
83
84
//Start a relative menu.
85
static
MenuPathBuilder
menu(
const
std::string& name);
86
87
//Get the current path.
88
inline
const
std::string&
path
()
const
{
return
myPath; }
89
92
DtMenuPath
menuPart()
const
;
93
96
DtMenuPath
parentMenu()
const
;
97
99
DtMenuPath
rootParentMenu()
const
;
100
103
std::string name()
const
;
104
106
bool
isEmpty()
const
;
107
109
bool
isAbsolutePath()
const
;
110
112
bool
isMainMenu()
const
;
113
115
bool
isPopupPath()
const
;
116
118
bool
isMenu()
const
;
119
121
bool
isItem()
const
;
122
124
bool
isChildOf(
const
DtMenuPath
& parent)
const
;
125
127
bool
isDescendant(
const
DtMenuPath
& ancestor)
const
;
128
130
bool
isSiblingOf(
const
DtMenuPath
& sibling)
const
;
131
133
bool
isSeparator()
const
;
134
135
bool
operator ==
(
const
DtMenuPath
& other)
const
;
136
bool
operator <(
const
DtMenuPath
& other)
const
;
137
bool
operator !=
(
const
DtMenuPath
& other)
const
;
138
139
protected
:
140
142
DtMenuPath
(
const
std::string& path);
143
145
std::string
myPath
;
146
};
147
148
149
}
150
151
#endif
152
makVrv::DtMenuPath::MenuPathBuilder::myPath
std::string myPath
Definition:
DtMenuPath.h:60
makVrv::DtMenuPath::MenuPathBuilder
Definition:
DtMenuPath.h:33
makVrv::DtMenuPath::path
const std::string & path() const
Definition:
DtMenuPath.h:88
makVrv::DtMenuPath::MenuPathBuilder::path
const std::string & path() const
Definition:
DtMenuPath.h:55
makVrv::DtMenuPath::myPath
std::string myPath
Internal path.
Definition:
DtMenuPath.h:145
DT_DLL_VRVCORE
#define DT_DLL_VRVCORE
Definition:
vrvCore.h:20
makVrv::DtMenuPath
a Class which represents a menu path.
Definition:
DtMenuPath.h:27
makVrv::operator==
bool operator==(const DtTextureAtlasIndexParser::StringOrFloatAttrib &lhs, const DtTextureAtlasIndexParser::StringOrFloatAttrib &rhs)
needed for search comparison code
Definition:
DtTextureAtlasIndexParser.h:153
operator!=
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
vrvCore.h
Contains DLL export macros.
Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (
www.mak.com
)