From 9e6833a41a32fe45bf802f5197431bc38b50fe37 Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Tue, 5 Jun 2001 23:47:40 +0000 Subject: [PATCH] use combined srcs --- panda/src/gui/Sources.pp | 27 ++++++++++++++------------- panda/src/gui/guiButton.cxx | 14 +++++++------- panda/src/gui/gui_composite1.cxx | 9 +++++++++ panda/src/gui/gui_composite2.cxx | 9 +++++++++ 4 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 panda/src/gui/gui_composite1.cxx create mode 100644 panda/src/gui/gui_composite2.cxx diff --git a/panda/src/gui/Sources.pp b/panda/src/gui/Sources.pp index 9f706e640b..2a813426bd 100644 --- a/panda/src/gui/Sources.pp +++ b/panda/src/gui/Sources.pp @@ -6,21 +6,22 @@ #define LOCAL_LIBS \ putil display tform device pandabase dgraph sgattrib light gobj text + + #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx #define SOURCES \ - config_gui.h config_gui.cxx \ - guiManager.h guiManager.I guiManager.cxx \ - guiLabel.h guiLabel.I guiLabel.cxx \ - guiItem.h guiItem.I guiItem.cxx \ - guiRollover.h guiRollover.I guiRollover.cxx \ - guiButton.h guiButton.I guiButton.cxx \ - guiFrame.h guiFrame.I guiFrame.cxx \ - guiSign.h guiSign.I guiSign.cxx \ - guiListBox.h guiListBox.I guiListBox.cxx \ - guiBackground.h guiBackground.I guiBackground.cxx \ - guiBehavior.h guiBehavior.I guiBehavior.cxx \ - guiChooser.h guiChooser.I guiChooser.cxx \ - guiCollection.h guiCollection.I guiCollection.cxx + config_gui.h guiManager.h guiManager.I guiLabel.h guiLabel.I \ + guiItem.h guiItem.I guiRollover.h guiRollover.I guiButton.h \ + guiButton.I guiFrame.h guiFrame.I guiSign.h guiSign.I \ + guiListBox.h guiListBox.I guiBackground.h guiBackground.I \ + guiBehavior.h guiBehavior.I guiChooser.h guiChooser.I \ + guiCollection.h guiCollection.I + + #define INCLUDED_SOURCES \ + config_gui.cxx guiManager.cxx guiLabel.cxx guiItem.cxx \ + guiRollover.cxx guiButton.cxx guiFrame.cxx guiSign.cxx \ + guiListBox.cxx guiBackground.cxx guiBehavior.cxx \ + guiChooser.cxx guiCollection.cxx #define INSTALL_HEADERS \ guiManager.h guiManager.I \ diff --git a/panda/src/gui/guiButton.cxx b/panda/src/gui/guiButton.cxx index c54d52593d..6ede2575df 100644 --- a/panda/src/gui/guiButton.cxx +++ b/panda/src/gui/guiButton.cxx @@ -25,7 +25,7 @@ typedef map ButtonMap; static ButtonMap buttons; -static bool added_hooks = false; +static bool bAddedHooks = false; TypeHandle GuiButton::_type_handle; @@ -556,13 +556,13 @@ GuiButton::~GuiButton(void) { buttons.erase(this->_rgn.p()); if (gui_cat.is_debug()) gui_cat->debug() << "erased from button map" << endl; - if ((buttons.size() == 0) && added_hooks) { + if ((buttons.size() == 0) && bAddedHooks) { /* _eh->remove_hook("gui-enter", enter_button); _eh->remove_hook("gui-exit" + get_name(), exit_button); _eh->remove_hook("gui-button-press", click_button_down); _eh->remove_hook("gui-button-release", click_button_up); - added_hooks = false; + bAddedHooks = false; */ } @@ -577,14 +577,14 @@ GuiButton::~GuiButton(void) { } void GuiButton::manage(GuiManager* mgr, EventHandler& eh) { - if (!added_hooks) { + if (!bAddedHooks) { mgr->get_private_handler()->add_hook("gui-enter", enter_button); mgr->get_private_handler()->add_hook("gui-exit", exit_button); mgr->get_private_handler()->add_hook("gui-button-press", click_button_down); mgr->get_private_handler()->add_hook("gui-button-release", click_button_up); - added_hooks = true; + bAddedHooks = true; } if (_mgr == (GuiManager*)0L) { GuiBehavior::manage(mgr, eh); @@ -597,14 +597,14 @@ void GuiButton::manage(GuiManager* mgr, EventHandler& eh) { } void GuiButton::manage(GuiManager* mgr, EventHandler& eh, Node* n) { - if (!added_hooks) { + if (!bAddedHooks) { mgr->get_private_handler()->add_hook("gui-enter", enter_button); mgr->get_private_handler()->add_hook("gui-exit", exit_button); mgr->get_private_handler()->add_hook("gui-button-press", click_button_down); mgr->get_private_handler()->add_hook("gui-button-release", click_button_up); - added_hooks = true; + bAddedHooks = true; } if (_mgr == (GuiManager*)0L) { GuiBehavior::manage(mgr, eh, n); diff --git a/panda/src/gui/gui_composite1.cxx b/panda/src/gui/gui_composite1.cxx new file mode 100644 index 0000000000..e7895a4093 --- /dev/null +++ b/panda/src/gui/gui_composite1.cxx @@ -0,0 +1,9 @@ + +#include "config_gui.cxx" +#include "guiSign.cxx" +#include "guiListBox.cxx" +#include "guiBehavior.cxx" +#include "guiButton.cxx" +#include "guiChooser.cxx" +#include "guiCollection.cxx" + diff --git a/panda/src/gui/gui_composite2.cxx b/panda/src/gui/gui_composite2.cxx new file mode 100644 index 0000000000..fe8d520e5b --- /dev/null +++ b/panda/src/gui/gui_composite2.cxx @@ -0,0 +1,9 @@ + +#include "guiManager.cxx" +#include "guiLabel.cxx" +#include "guiItem.cxx" +#include "guiRollover.cxx" +#include "guiFrame.cxx" +#include "guiBackground.cxx" + +