1 /*
2  * Copyright(c) 2016, OpenAV
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met:
8  *     * Redistributions of source code must retain the above copyright
9  *       notice, this list of conditions and the following disclaimer.
10  *     * Redistributions in binary form must reproduce the above copyright
11  *       notice, this list of conditions and the following disclaimer in
12  *       the documentation and/or other materials provided with the
13  *       distribution.
14  *     * Neither the name of the <organization> nor the
15  *       names of its contributors may be used to endorse or promote
16  *       products derived from this software without specific prior
17  *       written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENAV BE LIABLE
23  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
26  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef OPENAV_AVTK_TEST_UI_HXX
33 #define OPENAV_AVTK_TEST_UI_HXX
34 
35 #include "avtk/avtk.hxx"
36 
37 #include "header.c"
38 
39 namespace Avtk
40 {
41 class Widget;
42 };
43 
44 class TestUI : public Avtk::UI
45 {
46 public:
47 	/// Set a NativeWindow for embedding: ignore for standalone
48 	TestUI(PuglNativeWindow parent = 0);
49 
50 	/// demo function, changes all widgets to value
51 	void setAllWidgets( Avtk::Widget* w, float value );
52 
53 	void widgetValueCB( Avtk::Widget* widget);
54 
55 	Avtk::Button* groupToggler;
56 	Avtk::Button* momentary;
57 	Avtk::Button* momentaryOut;
58 
59 	Avtk::Group* group1;
60 
61 	Avtk::Scroll* scroll;
62 
63 	Avtk::Slider* vertSlider;
64 	Avtk::Slider* horiSlider;
65 
66 	Avtk::EventEditor* editor;
67 
68 	Avtk::List* list;
69 	Avtk::List* list2;
70 	Avtk::Waveform* waveform;
71 
72 	Avtk::Spectrum* spectrum;
73 
74 	Avtk::Dialog* dialog;
75 };
76 
77 
78 #endif // OPENAV_AVTK_TEST_UI_HXX
79