mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
avuncular
This commit is contained in:
parent
4267bf3dc1
commit
79dc9d7d6c
46
panda/src/gui/guiBehavior.cxx
Normal file
46
panda/src/gui/guiBehavior.cxx
Normal file
@ -0,0 +1,46 @@
|
||||
// Filename: guiBehavior.cxx
|
||||
// Created by: cary (07Feb01)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "guiBehavior.h"
|
||||
|
||||
TypeHandle GuiBehavior::_type_handle;
|
||||
|
||||
GuiBehavior::GuiBehavior(const string& name) : GuiItem(name),
|
||||
_eh((EventHandler*)0L) {
|
||||
}
|
||||
|
||||
GuiBehavior::~GuiBehavior(void) {
|
||||
}
|
||||
|
||||
void GuiBehavior::manage(GuiManager* mgr, EventHandler& eh) {
|
||||
_eh = &eh;
|
||||
GuiItem::manage(mgr, eh);
|
||||
}
|
||||
|
||||
void GuiBehavior::unmanage(void) {
|
||||
if (_behavior_running)
|
||||
this->stop_behavior();
|
||||
_eh = (EventHandler)0L;
|
||||
GuiItem::unmanage();
|
||||
}
|
||||
|
||||
void GuiBehavior::start_behavior(void) {
|
||||
_behavior_running = true;
|
||||
}
|
||||
|
||||
void GuiBehavior::stop_behavior(void) {
|
||||
_behavior_running = false;
|
||||
}
|
||||
|
||||
void GuiBehavior::reset_behavior(void) {
|
||||
}
|
||||
|
||||
void GuiBehavior::output(ostream& os) const {
|
||||
GuiItem::output(os);
|
||||
os << " Behavior Data:" << endl;
|
||||
os << " behavior is " << (_behavior_running?"":"not ") << "running"
|
||||
<< endl;
|
||||
os << " eh - 0x" << (void*)_eh << endl;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user