From d2109565408c6be469642b5aafc2f2efe71a632f Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 17 Jul 2004 10:08:16 +0000 Subject: Starting up Dalos --- lib/glbase.cc | 5 +---- lib/widgets.cc | 13 ++++++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/glbase.cc b/lib/glbase.cc index a404f8e..cbb1927 100644 --- a/lib/glbase.cc +++ b/lib/glbase.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: glbase.cc,v 1.19 2004-07-15 14:21:31 pixel Exp $ */ +/* $Id: glbase.cc,v 1.20 2004-07-17 10:08:16 pixel Exp $ */ #include #include @@ -71,9 +71,6 @@ mogltk::glbase::glbase(int w, int h, int flags) throw (GeneralException) : moglt printm(M_INFO, String("Version : ") + (char *) glGetString(GL_VERSION) + "\n"); printm(M_INFO, String("Extensions: ") + (char *) glGetString(GL_EXTENSIONS) + "\n"); - Output e("ext.txt"); - e.write(glGetString(GL_EXTENSIONS), strlen((char *) glGetString(GL_EXTENSIONS))); - glViewport(0, 0, surface->w, surface->h); glCullFace(GL_BACK); diff --git a/lib/widgets.cc b/lib/widgets.cc index 3298385..9d62bd9 100644 --- a/lib/widgets.cc +++ b/lib/widgets.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: widgets.cc,v 1.7 2004-07-16 15:04:53 pixel Exp $ */ +/* $Id: widgets.cc,v 1.8 2004-07-17 10:08:16 pixel Exp $ */ #include #include @@ -900,11 +900,10 @@ bool mogltk::widgets::ContextMenu::process_event(int xe, int ye, mogltk::event_t action * a; int n; - selected = -1; - switch (event) { case E_MOUSE_MOVE: sticky = false; + selected = -1; for (i = nodes.begin(), n = 0; i != nodes.end(); i++, n++) { if (!i->GetLine()) { int ax, ax2, ay, ay2; @@ -985,6 +984,10 @@ String mogltk::widgets::Menu::node::GetCaption() { return caption; } +void mogltk::widgets::Menu::node::SetCaption(const String & s) { + caption = s; +} + mogltk::widgets::ContextMenu * mogltk::widgets::Menu::node::GetSub() { return sub; } @@ -1037,6 +1040,10 @@ void mogltk::widgets::Menu::SetEnabled(int i, bool e) { nodes[i].SetEnabled(e); } +void mogltk::widgets::Menu::SetCaption(int i, const String & s) { + nodes[i].SetCaption(s); +} + void mogltk::widgets::Menu::draw(void) { std::vector::iterator i; int n; -- cgit v1.2.3