Last change
on this file since 1619 was
1386,
checked in by dkearney, 15 years ago
|
adding a few object prototypes we can play with for future developement. the plot object is probably the most interesting. examples are located in examples/objects dirs
|
File size:
879 bytes
|
Line | |
---|
1 | #include <iostream> |
---|
2 | #include "RpString.h" |
---|
3 | |
---|
4 | int |
---|
5 | printString(Rappture::String *n) |
---|
6 | { |
---|
7 | std::cout << "path: " << n->path() << std::endl; |
---|
8 | std::cout << "label: " << n->label() << std::endl; |
---|
9 | std::cout << "desc: " << n->desc() << std::endl; |
---|
10 | std::cout << "hints: " << n->hints() << std::endl; |
---|
11 | std::cout << "default: " << n->def() << std::endl; |
---|
12 | std::cout << "current: " << n->cur() << std::endl; |
---|
13 | std::cout << "width: " << n->width() << std::endl; |
---|
14 | std::cout << "height: " << n->height() << std::endl; |
---|
15 | return 0; |
---|
16 | } |
---|
17 | |
---|
18 | int main() |
---|
19 | { |
---|
20 | Rappture::String *n = NULL; |
---|
21 | |
---|
22 | n = new Rappture::String("input.string(temperature)", |
---|
23 | "myString Value","mylabel", |
---|
24 | "mydesc","myhint",20,30); |
---|
25 | |
---|
26 | printString(n); |
---|
27 | |
---|
28 | Rappture::String n1("input.string(eV)","eV"); |
---|
29 | printString(&n1); |
---|
30 | |
---|
31 | delete n; |
---|
32 | |
---|
33 | return 0; |
---|
34 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.