C++ SDK Reference  12.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguyInfoPopup.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 1992-2013 Boston Dynamics
4  * ALL RIGHTS RESERVED.
5  *
6  * These coded instructions, statements, and computer programs
7  * contain unpublished proprietary information of Boston Dynamics
8  * and are protected by Copyright Laws of the United States.
9  * They may not be used, duplicated, or disclosed in any form, in
10  * whole or in part, without the prior written consent from Boston
11  * Dynamics.
12  *
13  * RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the government is subject
15  * to restrictions as set forth in FAR 52.227.19(c)(2) or
16  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
17  * Computer Software clause at DFARS 252.227-7013 and/or in
18  * similar or successor clauses in the FAR, or the DOD or NASA
19  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
20  * Commercial Computer Software--Restricted Rights at 48 CFR
21  * 52.227-19, as applicable. Unpublished-rights reserved under
22  * the Copyright Laws of the United States.
23  * Contractor/Manufacturer is:
24  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
25  */
26 
27 /*********************************************************************
28  **
29  *t diguyInfoPopup
30  **
31  *b Link against: libdiguy
32  */
33 
34 #ifndef __diguyInfoPopup_H
35 #define __diguyInfoPopup_H
36 
37 #ifdef SWIG
38 %module diguyInfoPopup
39 #else
40 #define CPLUSPLUS_ONLY
41 #endif
42 
43 #ifdef CPLUSPLUS_ONLY
44 
45 class bdiScenarioInfoPopup;
46 class diguyInfoPopup;
47 
48 #endif /* CPLUSPLUS_ONLY */
49 
50 
51 #include <declspec_diguy.h>
52 
53 /****************************************************************************/
54 class BDI_DECLSPEC_diguy diguyInfoPopup
55 {
56 
57 public:
58 
59  /*l
60  *b Description:
61  **
62  ** Returns the name of the info popup. This pointer will
63  ** never be NULL.
64  **
65  *b Returns:
66  **
67  ** name of the info popup
68  **
69  *b Callable From:
70  **
71  *- - C++
72  *- - Script
73  */
74  const char* get_name();
75 
76  /*l
77  *b Description:
78  **
79  ** This function sets the name of this object.
80  **
81  *b Returns:
82  **
83  ** 0 on success, -1 on failure
84  **
85  *b Callable From:
86  **
87  *- - C++
88  *- - Script
89  */
90  int set_name(const char* name);
91 
92  /*l
93  *b Description:
94  **
95  ** This function shows the info popup.
96  **
97  *b Arguments:
98  **
99  *a duration - length of time in seconds to show to the info popup;
100  *a the default argument of -1 will show the info popup
101  *a indefinitely, until the hide() function is called
102  **
103  *b Returns:
104  **
105  ** 0 on success, -1 on failure
106  **
107  *b Callable From:
108  **
109  *- - C++
110  *- - Script
111  *- - Decision Bead
112  */
113  int show(float show_duration = -1.0f);
114 
115  /*l
116  *b Description:
117  **
118  ** This function hides the info popup, if it is currently shown.
119  **
120  *b Returns:
121  **
122  ** 0 on success, -1 on failure
123  **
124  *b Callable From:
125  **
126  *- - C++
127  *- - Script
128  *- - Decision Bead
129  */
130  int hide();
131 
132  /*l
133  *b Returns:
134  **
135  ** Returns 1 if the info popup is showing, 0 if not.
136  **
137  *b Callable From:
138  **
139  *- - C++
140  *- - Script
141  *- - Decision Bead
142  */
143  int is_showing();
144 
145  /*l
146  *b Description:
147  **
148  ** This function clears the contents of the info popup.
149  **
150  *b Returns:
151  **
152  ** 0 on success, -1 on failure
153  **
154  *b Callable From:
155  **
156  *- - C++
157  *- - Script
158  */
159  int clear();
160 
161  /*l
162  *b Description:
163  **
164  ** This function appends the contents of the file identified
165  ** by filename to the info popup.
166  **
167  *b Arguments:
168  **
169  *a filename - name of the file
170  **
171  *b Returns:
172  **
173  ** 0 on success, -1 on failure
174  **
175  *b Callable From:
176  **
177  *- - C++
178  *- - Script
179  */
180  int append_file(const char* filename);
181 
182  /*l
183  *b Description:
184  **
185  ** This function appends a string to the info popup.
186  **
187  *b Arguments:
188  **
189  *a string - string to append
190  **
191  *b Returns:
192  **
193  ** 0 on success, -1 on failure
194  **
195  *b Callable From:
196  **
197  *- - C++
198  *- - Script
199  */
200  int append_string(const char* string);
201 
202 
207 #ifdef CPLUSPLUS_ONLY
208 
209 private:
210 
211  /*l
212  ** A private constructor.
213  */
214  diguyInfoPopup(bdiScenarioInfoPopup* info_popup);
215 
216  /*l
217  ** A pointer to internal data.
218  */
219  bdiScenarioInfoPopup* m_scripted_object;
220 
221  friend class bdiScenarioInfoPopup;
222 
223 #endif /* CPLUSPLUS_ONLY */
224 
225 };
226 
227 #endif /* __diguyInfoPopup_H */