Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

GraphicsWindow Class Reference

#include <graphicsWindow.h>

Inheritance diagram for GraphicsWindow:

TypedReferenceCount ClearableRegion TypedObject ReferenceCount glxGraphicsWindow RIBGraphicsWindow wcrGraphicsWindow WinGraphicsWindow wdxGraphicsWindow7 wdxGraphicsWindow8 wglGraphicsWindow List of all members.

Public Member Functions

MouseData get_mouse_data (int device) const
bool has_button_event (int device) const
ButtonEvent get_button_event (int device)
virtual int verify_window_sizes (int numsizes, int *dimen)
 PT (DisplayRegion) make_scratch_display_region(int x_size
INLINE void win_display_regions_changed ()
virtual bool begin_frame ()
void clear ()
virtual void end_frame ()
virtual void make_current ()
virtual void release_gsg ()
virtual void begin_flip ()
virtual void end_flip ()
virtual void process_events ()
virtual void set_properties_now (WindowProperties &properties)
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Public Attributes

int y_size const

Protected Types

typedef vector_GraphicsWindowInputDevice InputDevices

Protected Member Functions

 GraphicsWindow (GraphicsPipe *pipe, GraphicsStateGuardian *gsg)
virtual void close_window ()
virtual bool open_window ()
virtual bool do_reshape_request (int x_origin, int y_origin, int x_size, int y_size)
void declare_channel (int index, GraphicsChannel *chan)
void system_changed_properties (const WindowProperties &properties)
void system_changed_size (int x_size, int y_size)
 PT (GraphicsStateGuardian) _gsg
 PT (GraphicsPipe) _pipe

Protected Attributes

InputDevices _input_devices
Mutex _input_lock
WindowProperties _properties

Private Types

typedef pvector< PT(GraphicsChannelChannels )
typedef pvector< DisplayRegion * > DisplayRegions

Private Member Functions

 GraphicsWindow (const GraphicsWindow &copy)
void operator= (const GraphicsWindow &copy)
WindowProperties get_properties () const
WindowProperties get_requested_properties () const
void clear_rejected_properties ()
WindowProperties get_rejected_properties () const
void request_properties (const WindowProperties &requested_properties)
INLINE bool is_closed () const
INLINE bool is_active () const
INLINE bool is_fullscreen () const
void set_window_event (const string &window_event)
string get_window_event () const
INLINE GraphicsStateGuardianget_gsg () const
INLINE GraphicsPipeget_pipe () const
GraphicsChannelget_channel (int index)
void remove_channel (int index)
int get_max_channel_index () const
bool is_channel_defined (int index) const
int get_num_display_regions () const
DisplayRegionget_display_region (int n) const
int get_num_input_devices () const
string get_input_device_name (int device) const
bool has_pointer (int device) const
bool has_keyboard (int device) const
INLINE void determine_display_regions () const
void do_determine_display_regions ()

Private Attributes

PUBLISHED __pad0__: virtual ~GraphicsWindow()
Mutex _lock
Channels _channels
DisplayRegions _display_regions
bool _display_regions_stale
WindowProperties _requested_properties
WindowProperties _rejected_properties
string _window_event

Static Private Attributes

TypeHandle _type_handle

Friends

class GraphicsPipe
class GraphicsEngine

Member Typedef Documentation

typedef pvector< PT(GraphicsChannel) GraphicsWindow::Channels) [private]
 

Definition at line 169 of file graphicsWindow.h.

typedef pvector<DisplayRegion *> GraphicsWindow::DisplayRegions [private]
 

Definition at line 172 of file graphicsWindow.h.

typedef vector_GraphicsWindowInputDevice GraphicsWindow::InputDevices [protected]
 

Definition at line 151 of file graphicsWindow.h.


Constructor & Destructor Documentation

GraphicsWindow::GraphicsWindow GraphicsPipe pipe,
GraphicsStateGuardian gsg
[protected]
 

Definition at line 40 of file graphicsWindow.cxx.

References _display_regions_stale, _properties, _window_event, ClearableRegion::set_clear_depth_active(), WindowProperties::set_cursor_hidden(), WindowProperties::set_fullscreen(), WindowProperties::set_minimized(), WindowProperties::set_open(), and WindowProperties::set_undecorated().

GraphicsWindow::GraphicsWindow const GraphicsWindow &  copy  )  [private]
 

Definition at line 70 of file graphicsWindow.cxx.


Member Function Documentation

void GraphicsWindow::begin_flip  )  [virtual]
 

Reimplemented in glxGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow.

Definition at line 671 of file graphicsWindow.cxx.

Referenced by GraphicsEngine::flip_windows().

bool GraphicsWindow::begin_frame  )  [virtual]
 

Reimplemented in wdxGraphicsWindow8, glxGraphicsWindow, and RIBGraphicsWindow.

Definition at line 579 of file graphicsWindow.cxx.

References make_current(), and NULL.

Referenced by wdxGraphicsWindow8::begin_frame(), glxGraphicsWindow::begin_frame(), GraphicsEngine::cull_and_draw_together(), and GraphicsEngine::cull_bin_draw().

void GraphicsWindow::clear  ) 
 

Definition at line 600 of file graphicsWindow.cxx.

References _lock, _properties, WindowProperties::get_x_size(), WindowProperties::get_y_size(), ClearableRegion::is_any_clear_active(), NULL, and PT().

Referenced by GraphicsEngine::cull_and_draw_together(), and GraphicsEngine::cull_bin_draw().

void GraphicsWindow::clear_rejected_properties  )  [private]
 

Definition at line 147 of file graphicsWindow.cxx.

References _lock, _rejected_properties, and WindowProperties::clear().

void GraphicsWindow::close_window  )  [protected, virtual]
 

Reimplemented in glxGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow.

Definition at line 835 of file graphicsWindow.cxx.

Referenced by set_properties_now(), wcrGraphicsWindow::window_proc(), and wcrGraphicsWindow::~wcrGraphicsWindow().

void GraphicsWindow::declare_channel int  index,
GraphicsChannel chan
[protected]
 

Definition at line 918 of file graphicsWindow.cxx.

References _channels, index, and NULL.

Referenced by get_channel().

INLINE void GraphicsWindow::determine_display_regions  )  const [private]
 

Referenced by get_display_region(), and get_num_display_regions().

void GraphicsWindow::do_determine_display_regions  )  [private]
 

Definition at line 938 of file graphicsWindow.cxx.

References _channels, GraphicsLayer::_display_regions, _display_regions, _display_regions_stale, GraphicsChannel::_layers, _lock, DisplayRegion::is_active(), GraphicsLayer::is_active(), and GraphicsChannel::is_active().

bool GraphicsWindow::do_reshape_request int  x_origin,
int  y_origin,
int  x_size,
int  y_size
[protected, virtual]
 

Reimplemented in WinGraphicsWindow.

Definition at line 860 of file graphicsWindow.cxx.

Referenced by set_properties_now().

void GraphicsWindow::end_flip  )  [virtual]
 

Reimplemented in wdxGraphicsWindow7, and wdxGraphicsWindow8.

Definition at line 685 of file graphicsWindow.cxx.

Referenced by GraphicsEngine::flip_windows().

void GraphicsWindow::end_frame  )  [virtual]
 

Reimplemented in RIBGraphicsWindow, and wcrGraphicsWindow.

Definition at line 626 of file graphicsWindow.cxx.

References NULL.

Referenced by GraphicsEngine::cull_and_draw_together(), GraphicsEngine::cull_bin_draw(), wcrGraphicsWindow::end_frame(), and RIBGraphicsWindow::end_frame().

virtual TypeHandle GraphicsWindow::force_init_type void   )  [inline, virtual]
 

Reimplemented from TypedReferenceCount.

Reimplemented in wdxGraphicsWindow7, wdxGraphicsWindow8, glxGraphicsWindow, RIBGraphicsWindow, wcrGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow.

Definition at line 192 of file graphicsWindow.h.

References ReferenceCount::get_class_type(), and TypedReferenceCount::init_type().

ButtonEvent GraphicsWindow::get_button_event int  device  ) 
 

Definition at line 498 of file graphicsWindow.cxx.

References _input_devices, _input_lock, and has_button_event().

GraphicsChannel * GraphicsWindow::get_channel int  index  )  [private]
 

Definition at line 240 of file graphicsWindow.cxx.

References _channels, _lock, declare_channel(), GraphicsPipe::get_hw_channel(), index, NULL, and PT().

Referenced by ChanConfig::chan_eval().

TypeHandle GraphicsWindow::get_class_type void   )  [inline, static]
 

Reimplemented from ReferenceCount.

Reimplemented in wdxGraphicsWindow7, wdxGraphicsWindow8, glxGraphicsWindow, RIBGraphicsWindow, wcrGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow.

Definition at line 181 of file graphicsWindow.h.

Referenced by WinGraphicsWindow::force_init_type(), wcrGraphicsWindow::force_init_type(), WinGraphicsWindow::get_type(), WinGraphicsWindow::init_type(), wcrGraphicsWindow::init_type(), RIBGraphicsWindow::init_type(), and glxGraphicsWindow::init_type().

DisplayRegion * GraphicsWindow::get_display_region int  n  )  const [private]
 

Definition at line 369 of file graphicsWindow.cxx.

References _display_regions, _lock, determine_display_regions(), n, and NULL.

Referenced by GraphicsEngine::cull_and_draw_together(), and GraphicsEngine::cull_bin_draw().

INLINE GraphicsStateGuardian* GraphicsWindow::get_gsg  )  const [private]
 

Referenced by NonlinearImager::add_viewer(), GraphicsEngine::cull_and_draw_together(), GraphicsEngine::cull_bin_draw(), GraphicsEngine::WindowRenderer::do_pending(), event_T(), indirect_display_func(), and motion_display_func().

string GraphicsWindow::get_input_device_name int  device  )  const [private]
 

Definition at line 409 of file graphicsWindow.cxx.

References _input_devices, and _input_lock.

int GraphicsWindow::get_max_channel_index  )  const [private]
 

Definition at line 307 of file graphicsWindow.cxx.

References _channels, and _lock.

MouseData GraphicsWindow::get_mouse_data int  device  )  const
 

Definition at line 461 of file graphicsWindow.cxx.

References _input_devices, and _input_lock.

int GraphicsWindow::get_num_display_regions  )  const [private]
 

Definition at line 348 of file graphicsWindow.cxx.

References _display_regions, _lock, and determine_display_regions().

Referenced by GraphicsEngine::cull_and_draw_together(), and GraphicsEngine::cull_bin_draw().

int GraphicsWindow::get_num_input_devices  )  const [private]
 

Definition at line 394 of file graphicsWindow.cxx.

References _input_devices, and _input_lock.

INLINE GraphicsPipe* GraphicsWindow::get_pipe  )  const [private]
 

Referenced by GraphicsEngine::do_remove_window(), and GraphicsChannel::get_pipe().

WindowProperties GraphicsWindow::get_properties  )  const [private]
 

Definition at line 113 of file graphicsWindow.cxx.

References _lock, and _properties.

Referenced by PandaFramework::all_windows_closed(), wdxGraphicsWindow7::choose_device(), DisplayRegion::compute_pixels(), PandaFramework::event_window_event(), wdxGraphicsWindow8::handle_reshape(), wdxGraphicsWindow8::search_for_device(), and DisplayRegion::set_dimensions().

WindowProperties GraphicsWindow::get_rejected_properties  )  const [private]
 

Definition at line 162 of file graphicsWindow.cxx.

References _lock, and _rejected_properties.

WindowProperties GraphicsWindow::get_requested_properties  )  const [private]
 

Definition at line 131 of file graphicsWindow.cxx.

References _lock, and _requested_properties.

Referenced by DisplayRegion::compute_pixels().

virtual TypeHandle GraphicsWindow::get_type void   )  const [inline, virtual]
 

Reimplemented from TypedReferenceCount.

Reimplemented in wdxGraphicsWindow7, wdxGraphicsWindow8, glxGraphicsWindow, RIBGraphicsWindow, wcrGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow.

Definition at line 189 of file graphicsWindow.h.

References ReferenceCount::get_class_type().

string GraphicsWindow::get_window_event  )  const [private]
 

Definition at line 214 of file graphicsWindow.cxx.

References _lock, and _window_event.

bool GraphicsWindow::has_button_event int  device  )  const
 

Definition at line 481 of file graphicsWindow.cxx.

References _input_devices, and _input_lock.

Referenced by get_button_event().

bool GraphicsWindow::has_keyboard int  device  )  const [private]
 

Definition at line 444 of file graphicsWindow.cxx.

References _input_devices, and _input_lock.

bool GraphicsWindow::has_pointer int  device  )  const [private]
 

Definition at line 427 of file graphicsWindow.cxx.

References _input_devices, and _input_lock.

void GraphicsWindow::init_type void   )  [inline, static]
 

Reimplemented from TypedReferenceCount.

Reimplemented in wdxGraphicsWindow7, wdxGraphicsWindow8, glxGraphicsWindow, RIBGraphicsWindow, wcrGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow.

Definition at line 184 of file graphicsWindow.h.

References TypedObject::get_class_type(), TypedReferenceCount::init_type(), and register_type().

Referenced by WinGraphicsWindow::force_init_type(), wcrGraphicsWindow::force_init_type(), init_libdisplay(), WinGraphicsWindow::init_type(), wcrGraphicsWindow::init_type(), RIBGraphicsWindow::init_type(), and glxGraphicsWindow::init_type().

INLINE bool GraphicsWindow::is_active  )  const [private]
 

Referenced by GraphicsEngine::cull_and_draw_together(), GraphicsEngine::cull_bin_draw(), wdxGraphicsWindow8::end_flip(), and wdxGraphicsWindow7::end_flip().

bool GraphicsWindow::is_channel_defined int  index  )  const [private]
 

Definition at line 327 of file graphicsWindow.cxx.

References _channels, _lock, index, and NULL.

INLINE bool GraphicsWindow::is_closed  )  const [private]
 

INLINE bool GraphicsWindow::is_fullscreen  )  const [private]
 

Referenced by wdxGraphicsWindow7::choose_device(), WinGraphicsWindow::close_window(), wdxGraphicsWindow8::create_screen_buffers_and_device(), wdxGraphicsWindow7::create_screen_buffers_and_device(), WinGraphicsWindow::do_reshape_request(), wdxGraphicsWindow8::handle_mouse_motion(), wdxGraphicsWindow8::init_resized_window(), WinGraphicsWindow::open_window(), wdxGraphicsWindow8::search_for_device(), wdxGraphicsWindow7::set_coop_levels_and_display_modes(), set_properties_now(), and WinGraphicsWindow::window_proc().

void GraphicsWindow::make_current  )  [virtual]
 

Reimplemented in wdxGraphicsWindow7, wdxGraphicsWindow8, glxGraphicsWindow, RIBGraphicsWindow, wcrGraphicsWindow, and wglGraphicsWindow.

Definition at line 639 of file graphicsWindow.cxx.

Referenced by begin_frame().

bool GraphicsWindow::open_window  )  [protected, virtual]
 

Reimplemented in wdxGraphicsWindow7, wdxGraphicsWindow8, glxGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow.

Definition at line 846 of file graphicsWindow.cxx.

Referenced by PandaFramework::open_window(), and set_properties_now().

void GraphicsWindow::operator= const GraphicsWindow &  copy  )  [private]
 

Definition at line 80 of file graphicsWindow.cxx.

void GraphicsWindow::process_events  )  [virtual]
 

Reimplemented in glxGraphicsWindow, wcrGraphicsWindow, and WinGraphicsWindow.

Definition at line 699 of file graphicsWindow.cxx.

References _lock, _rejected_properties, _requested_properties, WindowProperties::add_properties(), WindowProperties::clear(), WindowProperties::is_any_specified(), and set_properties_now().

Referenced by WinGraphicsWindow::process_events(), GraphicsEngine::process_events(), and glxGraphicsWindow::process_events().

GraphicsWindow::PT GraphicsPipe   )  [protected]
 

GraphicsWindow::PT GraphicsStateGuardian   )  [protected]
 

GraphicsWindow::PT DisplayRegion   ) 
 

Referenced by clear(), and get_channel().

void GraphicsWindow::release_gsg  )  [virtual]
 

Reimplemented in glxGraphicsWindow, and wglGraphicsWindow.

Definition at line 652 of file graphicsWindow.cxx.

Referenced by wcrGraphicsWindow::DestroyMe(), GraphicsEngine::WindowRenderer::do_pending(), GraphicsEngine::WindowRenderer::do_release(), wglGraphicsWindow::release_gsg(), and glxGraphicsWindow::release_gsg().

void GraphicsWindow::remove_channel int  index  )  [private]
 

Definition at line 288 of file graphicsWindow.cxx.

References _channels, _lock, and index.

void GraphicsWindow::request_properties const WindowProperties requested_properties  )  [private]
 

Definition at line 183 of file graphicsWindow.cxx.

References _lock, _requested_properties, and WindowProperties::add_properties().

void GraphicsWindow::set_properties_now WindowProperties properties  )  [virtual]
 

Reimplemented in glxGraphicsWindow, and WinGraphicsWindow.

Definition at line 741 of file graphicsWindow.cxx.

References _channels, _properties, _rejected_properties, WindowProperties::add_properties(), WindowProperties::clear(), WindowProperties::clear_fullscreen(), WindowProperties::clear_origin(), WindowProperties::clear_size(), close_window(), do_reshape_request(), WindowProperties::get_fullscreen(), WindowProperties::get_open(), WindowProperties::get_x_origin(), WindowProperties::get_x_size(), WindowProperties::get_y_origin(), WindowProperties::get_y_size(), WindowProperties::has_fullscreen(), WindowProperties::has_open(), WindowProperties::has_origin(), WindowProperties::has_size(), is_fullscreen(), NULL, open_window(), WindowProperties::set_open(), WindowProperties::set_origin(), WindowProperties::set_size(), system_changed_size(), and GraphicsChannel::window_resized().

Referenced by GraphicsEngine::WindowRenderer::do_close(), GraphicsEngine::WindowRenderer::do_pending(), process_events(), WinGraphicsWindow::set_properties_now(), and glxGraphicsWindow::set_properties_now().

void GraphicsWindow::set_window_event const string &  window_event  )  [private]
 

Definition at line 201 of file graphicsWindow.cxx.

References _lock, and _window_event.

void GraphicsWindow::system_changed_properties const WindowProperties properties  )  [protected]
 

Definition at line 873 of file graphicsWindow.cxx.

References _lock, _properties, _window_event, WindowProperties::add_properties(), WindowProperties::get_x_size(), WindowProperties::get_y_size(), WindowProperties::has_size(), system_changed_size(), and throw_event().

Referenced by wdxGraphicsWindow7::create_screen_buffers_and_device(), WinGraphicsWindow::handle_reshape(), glxGraphicsWindow::process_events(), and WinGraphicsWindow::window_proc().

void GraphicsWindow::system_changed_size int  x_size,
int  y_size
[protected]
 

Definition at line 896 of file graphicsWindow.cxx.

References _channels, _properties, WindowProperties::get_x_size(), WindowProperties::get_y_size(), and GraphicsChannel::window_resized().

Referenced by wdxGraphicsWindow8::search_for_device(), set_properties_now(), and system_changed_properties().

int GraphicsWindow::verify_window_sizes int  numsizes,
int *  dimen
[virtual]
 

Reimplemented in wdxGraphicsWindow8.

Definition at line 532 of file graphicsWindow.cxx.

INLINE void GraphicsWindow::win_display_regions_changed  ) 
 

Referenced by GraphicsChannel::win_display_regions_changed().


Friends And Related Function Documentation

friend class GraphicsEngine [friend]
 

Definition at line 198 of file graphicsWindow.h.

friend class GraphicsPipe [friend]
 

Definition at line 197 of file graphicsWindow.h.


Member Data Documentation

PUBLISHED GraphicsWindow::__pad0__ [private]
 

Reimplemented from ClearableRegion.

Definition at line 68 of file graphicsWindow.h.

Channels GraphicsWindow::_channels [private]
 

Definition at line 170 of file graphicsWindow.h.

Referenced by declare_channel(), do_determine_display_regions(), get_channel(), get_max_channel_index(), is_channel_defined(), remove_channel(), set_properties_now(), and system_changed_size().

DisplayRegions GraphicsWindow::_display_regions [private]
 

Definition at line 173 of file graphicsWindow.h.

Referenced by do_determine_display_regions(), get_display_region(), and get_num_display_regions().

bool GraphicsWindow::_display_regions_stale [private]
 

Definition at line 174 of file graphicsWindow.h.

Referenced by do_determine_display_regions(), and GraphicsWindow().

InputDevices GraphicsWindow::_input_devices [protected]
 

Definition at line 152 of file graphicsWindow.h.

Referenced by wcrGraphicsWindow::config(), get_button_event(), get_input_device_name(), get_mouse_data(), get_num_input_devices(), glxGraphicsWindow::glxGraphicsWindow(), wcrGraphicsWindow::handle_keypress(), wcrGraphicsWindow::handle_keyrelease(), wcrGraphicsWindow::handle_mouse_entry(), WinGraphicsWindow::handle_mouse_exit(), WinGraphicsWindow::handle_mouse_motion(), wcrGraphicsWindow::handle_mouse_motion(), has_button_event(), has_keyboard(), has_pointer(), glxGraphicsWindow::process_events(), WinGraphicsWindow::window_proc(), wcrGraphicsWindow::window_proc(), and WinGraphicsWindow::WinGraphicsWindow().

Mutex GraphicsWindow::_input_lock [protected]
 

Definition at line 153 of file graphicsWindow.h.

Referenced by get_button_event(), get_input_device_name(), get_mouse_data(), get_num_input_devices(), has_button_event(), has_keyboard(), and has_pointer().

Mutex GraphicsWindow::_lock [private]
 

Definition at line 166 of file graphicsWindow.h.

Referenced by clear(), clear_rejected_properties(), do_determine_display_regions(), get_channel(), get_display_region(), get_max_channel_index(), get_num_display_regions(), get_properties(), get_rejected_properties(), get_requested_properties(), get_window_event(), is_channel_defined(), process_events(), remove_channel(), request_properties(), set_window_event(), and system_changed_properties().

WindowProperties GraphicsWindow::_properties [protected]
 

Definition at line 163 of file graphicsWindow.h.

Referenced by clear(), get_properties(), GraphicsWindow(), WinGraphicsWindow::open_fullscreen_window(), WinGraphicsWindow::open_regular_window(), glxGraphicsWindow::open_window(), wdxGraphicsWindow8::search_for_device(), set_properties_now(), glxGraphicsWindow::set_properties_now(), system_changed_properties(), system_changed_size(), and WinGraphicsWindow::window_proc().

WindowProperties GraphicsWindow::_rejected_properties [private]
 

Definition at line 177 of file graphicsWindow.h.

Referenced by clear_rejected_properties(), get_rejected_properties(), process_events(), and set_properties_now().

WindowProperties GraphicsWindow::_requested_properties [private]
 

Definition at line 176 of file graphicsWindow.h.

Referenced by get_requested_properties(), process_events(), and request_properties().

TypeHandle GraphicsWindow::_type_handle [static, private]
 

Reimplemented from TypedReferenceCount.

Reimplemented in wdxGraphicsWindow7, wdxGraphicsWindow8, glxGraphicsWindow, RIBGraphicsWindow, wcrGraphicsWindow, wglGraphicsWindow, and WinGraphicsWindow.

Definition at line 30 of file graphicsWindow.cxx.

string GraphicsWindow::_window_event [private]
 

Definition at line 178 of file graphicsWindow.h.

Referenced by get_window_event(), GraphicsWindow(), set_window_event(), and system_changed_properties().

int y_size GraphicsWindow::const
 

Definition at line 108 of file graphicsWindow.h.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:12:32 2003 for Panda by doxygen1.3