00001 // Filename: config_pgui.cxx 00002 // Created by: drose (02Jul01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "config_pgui.h" 00020 #include "pgButton.h" 00021 #include "pgCullTraverser.h" 00022 #include "pgEntry.h" 00023 #include "pgMouseWatcherParameter.h" 00024 #include "pgMouseWatcherGroup.h" 00025 #include "pgItem.h" 00026 #include "pgMouseWatcherBackground.h" 00027 #include "pgMouseWatcherRegion.h" 00028 #include "pgTop.h" 00029 #include "pgWaitBar.h" 00030 00031 #include "dconfig.h" 00032 00033 Configure(config_pgui); 00034 NotifyCategoryDef(pgui, ""); 00035 00036 ConfigureFn(config_pgui) { 00037 init_libpgui(); 00038 } 00039 00040 // If this is true, uses a QuickRenderTraverser to render PGItems; 00041 // otherwise, uses a normal DirectRenderTraverser, which is more 00042 // powerful but somewhat slower. 00043 const bool pgui_quick = config_pgui.GetBool("pgui-quick", true); 00044 00045 // Temporary variable to support old-style button press/release for 00046 // pgentries, before keystrokes were implemented. 00047 const bool use_keystrokes = config_pgui.GetBool("use-keystrokes", true); 00048 00049 00050 //////////////////////////////////////////////////////////////////// 00051 // Function: init_libpgui 00052 // Description: Initializes the library. This must be called at 00053 // least once before any of the functions or classes in 00054 // this library can be used. Normally it will be 00055 // called by the static initializers and need not be 00056 // called explicitly, but special cases exist. 00057 //////////////////////////////////////////////////////////////////// 00058 void 00059 init_libpgui() { 00060 static bool initialized = false; 00061 if (initialized) { 00062 return; 00063 } 00064 initialized = true; 00065 00066 PGButton::init_type(); 00067 PGCullTraverser::init_type(); 00068 PGEntry::init_type(); 00069 PGMouseWatcherParameter::init_type(); 00070 PGMouseWatcherGroup::init_type(); 00071 PGItem::init_type(); 00072 PGMouseWatcherBackground::init_type(); 00073 PGMouseWatcherRegion::init_type(); 00074 PGTop::init_type(); 00075 PGWaitBar::init_type(); 00076 }