Panda3D
config_pgui.cxx
1 // Filename: config_pgui.cxx
2 // Created by: drose (02Jul01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "config_pgui.h"
16 #include "pgButton.h"
17 #include "pgCullTraverser.h"
18 #include "pgEntry.h"
19 #include "pgMouseWatcherParameter.h"
20 #include "pgMouseWatcherGroup.h"
21 #include "pgItem.h"
22 #include "pgMouseWatcherBackground.h"
23 #include "pgMouseWatcherRegion.h"
24 #include "pgScrollFrame.h"
25 #include "pgSliderBar.h"
26 #include "pgTop.h"
27 #include "pgVirtualFrame.h"
28 #include "pgWaitBar.h"
29 
30 #include "dconfig.h"
31 
32 Configure(config_pgui);
33 NotifyCategoryDef(pgui, "");
34 
35 ConfigureFn(config_pgui) {
36  init_libpgui();
37 }
38 
39 ConfigVariableDouble scroll_initial_delay
40 ("scroll-initial-delay", 0.3,
41  PRC_DESC("This is the amount of time, in seconds, to delay after the user "
42  "first clicks and holds on a scrollbar button before the scrolling "
43  "continues automatically."));
44 
45 ConfigVariableDouble scroll_continued_delay
46 ("scroll-continued-delay", 0.1,
47  PRC_DESC("This is the amount of time, in seconds, to delay between lines "
48  "scrolled while the user is continuing to hold down the scrollbar "
49  "button."));
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: init_libpgui
53 // Description: Initializes the library. This must be called at
54 // least once before any of the functions or classes in
55 // this library can be used. Normally it will be
56 // called by the static initializers and need not be
57 // called explicitly, but special cases exist.
58 ////////////////////////////////////////////////////////////////////
59 void
60 init_libpgui() {
61  static bool initialized = false;
62  if (initialized) {
63  return;
64  }
65  initialized = true;
66 
67  PGButton::init_type();
68  PGCullTraverser::init_type();
69  PGEntry::init_type();
70  PGMouseWatcherParameter::init_type();
71  PGMouseWatcherGroup::init_type();
72  PGItem::init_type();
73  PGMouseWatcherBackground::init_type();
74  PGMouseWatcherRegion::init_type();
75  PGScrollFrame::init_type();
76  PGSliderBar::init_type();
77  PGTop::init_type();
78  PGVirtualFrame::init_type();
79  PGWaitBar::init_type();
80 }
This is a convenience class to specialize ConfigVariable as a floating-point type.