15 #ifndef WINDOWFRAMEWORK_H 16 #define WINDOWFRAMEWORK_H 18 #include "pandabase.h" 21 #include "graphicsOutput.h" 22 #include "graphicsWindow.h" 23 #include "animControlCollection.h" 24 #include "trackball.h" 26 #include "frameRateMeter.h" 27 #include "sceneGraphAnalyzerMeter.h" 28 #include "pointerTo.h" 29 #include "partGroup.h" 31 #include "typedWritableReferenceCount.h" 32 #include "loaderOptions.h" 33 #include "pgSliderBar.h" 35 #include "eventHandler.h" 36 #include "genericAsyncTask.h" 77 INLINE
int get_num_cameras()
const;
78 INLINE
Camera *get_camera(
int n)
const;
90 void enable_keyboard();
91 void setup_trackball();
92 void center_trackball(
const NodePath &
object);
94 bool load_models(
const NodePath &parent,
95 int argc,
char *argv[],
int first_arg = 1);
96 bool load_models(
const NodePath &parent,
100 void loop_animations(
int hierarchy_match_flags =
101 PartGroup::HMF_ok_part_extra |
102 PartGroup::HMF_ok_anim_extra);
103 void stagger_animations();
104 void next_anim_control();
105 void set_anim_controls(
bool enable);
106 INLINE
bool get_anim_controls()
const;
107 void adjust_dimensions();
109 enum BackgroundType {
125 void set_wireframe(
bool enable,
bool filled=
false);
126 void set_texture(
bool enable);
127 void set_two_sided(
bool enable);
128 void set_one_sided_reverse(
bool enable);
129 void set_lighting(
bool enable);
130 void set_perpixel(
bool enable);
131 void set_background_type(BackgroundType type);
133 INLINE
bool get_wireframe()
const;
134 INLINE
bool get_wireframe_filled()
const;
135 INLINE
bool get_texture()
const;
136 INLINE
bool get_two_sided()
const;
137 INLINE
bool get_one_sided_reverse()
const;
138 INLINE
bool get_lighting()
const;
139 INLINE
bool get_perpixel()
const;
140 INLINE BackgroundType get_background_type()
const;
142 static TextFont *get_shuttle_controls_font();
150 void create_anim_controls();
151 void destroy_anim_controls();
152 void update_anim_controls();
154 void setup_shuttle_button(
const string &label,
int index,
155 EventHandler::EventCallbackFunction *func);
159 void forward_button();
161 static AsyncTask::DoneStatus st_update_anim_controls(
GenericAsyncTask *task,
void *data);
163 static void st_back_button(
const Event *,
void *data);
164 static void st_pause_button(
const Event *,
void *data);
165 static void st_play_button(
const Event *,
void *data);
166 static void st_forward_button(
const Event *,
void *data);
184 bool _anim_controls_enabled;
203 bool _wireframe_enabled;
204 bool _wireframe_filled;
205 bool _texture_enabled;
206 bool _two_sided_enabled;
207 bool _one_sided_reverse_enabled;
208 bool _lighting_enabled;
209 bool _perpixel_enabled;
214 BackgroundType _background_type;
216 static PT(
TextFont) _shuttle_controls_font;
222 static void init_type() {
223 TypedWritableReferenceCount::init_type();
224 register_type(_type_handle,
"WindowFramework",
225 TypedWritableReferenceCount::get_class_type());
228 return get_class_type();
230 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
238 #include "windowFramework.I" static const FrameBufferProperties & get_default()
Returns a FrameBufferProperties structure with all of the default values filled in according to the u...
A light shining from infinitely far away in a particular direction, like sunlight.
A basic node of the scene graph or data graph.
This is a special TextNode that automatically updates itself with output from a SceneGraphAnalyzer in...
This encapsulates the data that is normally associated with a single window, or with a single display...
Trackball acts like Performer in trackball mode.
A light source that seems to illuminate all points in space at once.
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
An encapsulation of a font; i.e.
A container for the various kinds of properties we might ask to have on a graphics window before we o...
The name of a file, such as a texture file or an Egg file.
This is a named collection of AnimControl pointers.
An object to create GraphicsOutputs that share a particular 3-D API.
Associates a generic C-style function pointer with an AsyncTask object.
A base class for things which need to inherit from both TypedWritable and from ReferenceCount.
This is a base class for the various different classes that represent the result of a frame of render...
A named event, possibly with parameters.
The primary interface to this module.
Encapsulates all the communication with a particular instance of a given rendering backend...
This is a special TextNode that automatically updates itself with the current frame rate...
A rectangular subregion within a window for rendering into.
This class serves to provide a high-level framework for basic applications that use Panda in simple w...
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
A node that can be positioned around in the scene graph to represent a point of view for rendering a ...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
This is a particular kind of PGItem that draws a little bar with a slider that moves from left to rig...