Panda3D
|
00001 // Filename: config_pgui.cxx 00002 // Created by: drose (02Jul01) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "config_pgui.h" 00016 #include "pgButton.h" 00017 #include "pgCullTraverser.h" 00018 #include "pgEntry.h" 00019 #include "pgMouseWatcherParameter.h" 00020 #include "pgMouseWatcherGroup.h" 00021 #include "pgItem.h" 00022 #include "pgMouseWatcherBackground.h" 00023 #include "pgMouseWatcherRegion.h" 00024 #include "pgScrollFrame.h" 00025 #include "pgSliderBar.h" 00026 #include "pgTop.h" 00027 #include "pgVirtualFrame.h" 00028 #include "pgWaitBar.h" 00029 00030 #include "dconfig.h" 00031 00032 Configure(config_pgui); 00033 NotifyCategoryDef(pgui, ""); 00034 00035 ConfigureFn(config_pgui) { 00036 init_libpgui(); 00037 } 00038 00039 ConfigVariableDouble scroll_initial_delay 00040 ("scroll-initial-delay", 0.3, 00041 PRC_DESC("This is the amount of time, in seconds, to delay after the user " 00042 "first clicks and holds on a scrollbar button before the scrolling " 00043 "continues automatically.")); 00044 00045 ConfigVariableDouble scroll_continued_delay 00046 ("scroll-continued-delay", 0.1, 00047 PRC_DESC("This is the amount of time, in seconds, to delay between lines " 00048 "scrolled while the user is continuing to hold down the scrollbar " 00049 "button.")); 00050 00051 //////////////////////////////////////////////////////////////////// 00052 // Function: init_libpgui 00053 // Description: Initializes the library. This must be called at 00054 // least once before any of the functions or classes in 00055 // this library can be used. Normally it will be 00056 // called by the static initializers and need not be 00057 // called explicitly, but special cases exist. 00058 //////////////////////////////////////////////////////////////////// 00059 void 00060 init_libpgui() { 00061 static bool initialized = false; 00062 if (initialized) { 00063 return; 00064 } 00065 initialized = true; 00066 00067 PGButton::init_type(); 00068 PGCullTraverser::init_type(); 00069 PGEntry::init_type(); 00070 PGMouseWatcherParameter::init_type(); 00071 PGMouseWatcherGroup::init_type(); 00072 PGItem::init_type(); 00073 PGMouseWatcherBackground::init_type(); 00074 PGMouseWatcherRegion::init_type(); 00075 PGScrollFrame::init_type(); 00076 PGSliderBar::init_type(); 00077 PGTop::init_type(); 00078 PGVirtualFrame::init_type(); 00079 PGWaitBar::init_type(); 00080 }