parent-window-handle

This commit is contained in:
David Rose 2009-06-01 19:18:07 +00:00
parent f3ed10e426
commit c77097dd09
3 changed files with 11 additions and 0 deletions

View File

@ -283,6 +283,13 @@ ConfigVariableEnum<WindowProperties::ZOrder> z_order
ConfigVariableString window_title
("window-title", "Panda");
ConfigVariableInt parent_window_handle
("parent-window-title", 0,
PRC_DESC("The window handle of the parent window to attach the Panda window "
"to, for the purposes of creating an embedded window. This is "
"an HWND on Windows, or the NSWindow pointer or XWindow pointer "
"converted to an integer, on OSX and X11."));
ConfigVariableString framebuffer_mode
("framebuffer-mode", "",
PRC_DESC("No longer has any effect. Do not use."));

View File

@ -72,6 +72,7 @@ extern EXPCL_PANDA_DISPLAY ConfigVariableFilename icon_filename;
extern EXPCL_PANDA_DISPLAY ConfigVariableFilename cursor_filename;
extern EXPCL_PANDA_DISPLAY ConfigVariableEnum<WindowProperties::ZOrder> z_order;
extern EXPCL_PANDA_DISPLAY ConfigVariableString window_title;
extern EXPCL_PANDA_DISPLAY ConfigVariableInt parent_window_handle;
extern EXPCL_PANDA_DISPLAY ConfigVariableString framebuffer_mode;
extern EXPCL_PANDA_DISPLAY ConfigVariableBool framebuffer_hardware;

View File

@ -83,6 +83,9 @@ get_default() {
props.set_z_order(z_order);
}
props.set_title(window_title);
if (parent_window_handle.get_value() != 0) {
props.set_parent_window(parent_window_handle);
}
props.set_mouse_mode(M_absolute);
return props;
}