HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
OP_PostItNoteList.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: OP_PostItNoteList.h (OP Library, C++)
7
*
8
* COMMENTS:
9
*/
10
11
#ifndef __OP_PostItNoteList__
12
#define __OP_PostItNoteList__
13
14
#include "
OP_API.h
"
15
#include "
OP_DataTypes.h
"
16
#include "
OP_Error.h
"
17
#include "
OP_Node.h
"
18
#include <
UT/UT_ValArray.h
>
19
#include <
SYS/SYS_Types.h
>
20
21
class
OP_Network
;
22
class
OP_PostIt
;
23
class
OP_PostItNoteItem;
24
class
OP_SaveFlags
;
25
26
class
OP_API
OP_PostItNoteList
:
public
UT_ValArray
<OP_PostIt *>
27
{
28
public
:
29
typedef
UT_ValArray<OP_PostIt *>
Base
;
30
31
OP_PostItNoteList
(
OP_Network
*net);
32
// NOTE: We don't need a virtual destructor, because our superclass
33
// has a non-virtual destructor, and this is only destructed
34
// as type OP_PostItNoteList.
35
~
OP_PostItNoteList
();
36
37
/// Remove all network boxes from this list
38
void
clearAndDestroy();
39
40
/// Create a network box with the specified name and insert it into this
41
/// OP_PostItNoteList at the next available index. Returns a pointer to the
42
/// OP_PostIt created or NULL if creation was unsuccessful. Pass in NULL
43
/// as the name if you'd like a default name. If a duplicate name is passed
44
/// in, it will be altered to make it unique. Passing in 'items' will
45
/// automatically create a network box containing those items with the
46
/// netbox positioned properly around them.
47
OP_PostIt
*createPostItNote(
const
char
*
name
);
48
49
/// Find and return a given network box by name, or NULL if it's not found
50
OP_PostIt
*findPostItNote(
const
char
*
name
)
const
;
51
52
/// Find the index of a given network box by name. Returns -1 if not found
53
int
findPostItNoteIndex(
const
char
*
name
)
const
;
54
55
/// Find the index of a given network box by ptr. Returns -1 if not found
56
int
findPostItNoteIndex(
OP_PostIt
*netbox)
const
;
57
58
/// Remove a network box by ptr. Returns true if it was successfully
59
/// removed; false if the box wasn't found
60
bool
deletePostItNote(
OP_PostIt
*netbox);
61
62
/// Remove a network box by index. Returns true if it was successfully
63
/// removed; false if the index is invalid
64
bool
deletePostItNote(
int
index
);
65
66
/// Load a network box from 'is'. Can load from both .hip files and the
67
/// clipboard. 'path' is used as the new netbox's name (only the portion of
68
/// path after the last slash). If 'overwrite' is specified, the new netbox
69
/// will overwrite any other netboxes in this network with the same name,
70
/// rather than modify its name to be unique. 'created' is used to return a
71
/// ptr to the new network box.
72
bool
load(
UT_IStream
&is,
const
char
*
path
,
73
bool
path_contains_network,
74
bool
path_contains_packet_ext,
75
OP_OverwriteAction
overwrite =
OP_NO_OVERWRITE
,
76
OP_PostIt
**created = NULL);
77
78
/// Return the amount of memory owned by this OP_PostItNoteList
79
int64
getMemoryUsage
(
bool
inclusive)
const
;
80
81
private
:
82
OP_Network
*myNetwork;
83
};
84
85
#endif
OP_Error.h
UT_IStream
Definition:
UT_IStream.h:56
path
GLsizei const GLchar *const * path
Definition:
glcorearb.h:3341
UT_Array::getMemoryUsage
int64 getMemoryUsage(bool inclusive=false) const
Definition:
UT_Array.h:657
OP_API.h
UT_ValArray
Definition:
GA_ArrayDataArray.h:33
SYS_Types.h
OP_SaveFlags
Definition:
OP_SaveFlags.h:15
OP_Node.h
UT_ValArray.h
int64
long long int64
Definition:
SYS_Types.h:116
OP_PostItNoteList
Definition:
OP_PostItNoteList.h:26
name
GLuint const GLchar * name
Definition:
glcorearb.h:786
OP_PostItNoteList::Base
UT_ValArray< OP_PostIt * > Base
Definition:
OP_PostItNoteList.h:29
OP_OverwriteAction
OP_OverwriteAction
Definition:
OP_DataTypes.h:125
OP_DataTypes.h
OP_API
#define OP_API
Definition:
OP_API.h:10
index
GLuint index
Definition:
glcorearb.h:786
OP_NO_OVERWRITE
Definition:
OP_DataTypes.h:128
OP_Network
Definition:
OP_Network.h:152
OP_PostIt
Definition:
OP_PostIt.h:42
OP
OP_PostItNoteList.h
Generated on Sun Nov 17 2024 03:01:35 for HDK by
1.8.6