HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OP_PostItNoteFlags.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 Library (C++)
7  *
8  * COMMENTS: A simple class to hold flags for post it notes
9  *
10  */
11 
12 #ifndef __OP_PostItNoteFlags_h__
13 #define __OP_PostItNoteFlags_h__
14 
15 #include "OP_API.h"
16 #include <iosfwd>
17 
18 
19 class OP_PostIt;
20 class UT_IStream;
21 class UT_String;
22 
23 #define OP_POSTITNOTE_MINIMIZED_FLAG 'm'
24 #define OP_POSTITNOTE_DRAWBACKGROUND_FLAG 'd'
25 
27 {
28 public:
29  void setMinimized(bool flag)
30  { myMinimized = flag; }
32  { myDrawBackground = flag; }
33  void setPicked(bool flag)
34  { myPicked = flag; }
35  void setResizing(bool flag)
36  { myResizing = flag; }
37 
38  bool getMinimized() const
39  { return myMinimized; }
40  bool getDrawBackground() const
41  { return myDrawBackground; }
42  bool getPicked() const
43  { return myPicked; }
44  bool getResizing() const
45  { return myResizing; }
46 
47 private:
48  bool myPicked:1, // Picked by user
49  myResizing:1, // Post-it is being resized
50  myMinimized:1,
51  myDrawBackground:1;
52 
53 private:
55 
56  void save(std::ostream &os);
57  bool load(UT_IStream &os, const char *path=0);
58 
59  bool loadAsciiFlag(const char *name, const char *val);
60  bool loadBinaryFlag(int tag, int val);
61 
62  ///Initializes all the flags to their default values
63  void setDefaults();
64 
65  friend class OP_PostIt;
66 };
67 
68 #endif
bool getDrawBackground() const
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
bool getMinimized() const
void setResizing(bool flag)
GLuint const GLchar * name
Definition: glcorearb.h:785
bool getResizing() const
void setPicked(bool flag)
#define OP_API
Definition: OP_API.h:10
void setMinimized(bool flag)
GLuint GLfloat * val
Definition: glcorearb.h:1607
void setDrawBackground(bool flag)
bool getPicked() const
png_infop png_uint_32 flag
Definition: png.h:2242
Definition: OP_PostIt.h:42