[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit kb_traverse.cc,NONE
From: |
Kai Sterker <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src/tools/dlgedit kb_traverse.cc,NONE,1.1 kb_traverse.h,NONE,1.1 Makefile.am,1.46,1.47 dlg_module.h,1.5,1.6 gui_graph.cc,1.4,1.5 gui_graph.h,1.5,1.6 |
Date: |
Mon, 14 Oct 2002 13:34:35 -0400 |
Update of /cvsroot/adonthell/adonthell/src/tools/dlgedit
In directory subversions:/tmp/cvs-serv27581
Modified Files:
Makefile.am dlg_module.h gui_graph.cc gui_graph.h
Added Files:
kb_traverse.cc kb_traverse.h
Log Message:
IMPROVED keyboard movement through graph, but still not too user friendly :(
***** Error reading new file: [Errno 2] No such file or directory:
'kb_traverse.cc'
***** Error reading new file: [Errno 2] No such file or directory:
'kb_traverse.h'
Index: Makefile.am
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/Makefile.am,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** Makefile.am 2 Sep 2002 10:57:41 -0000 1.46
--- Makefile.am 14 Oct 2002 17:34:32 -0000 1.47
***************
*** 37,40 ****
--- 37,41 ----
gui_settings.cc \
gui_tooltip.cc \
+ kb_traverse.cc \
lex.loadlg.cc \
main.cc \
***************
*** 67,71 ****
gui_modal_dialog.h \
gui_settings.h \
! gui_tooltip.h
# Evil, but it works...
--- 68,73 ----
gui_modal_dialog.h \
gui_settings.h \
! gui_tooltip.h \
! kb_traverse.h
# Evil, but it works...
Index: dlg_module.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/dlg_module.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** dlg_module.h 12 Oct 2002 18:51:33 -0000 1.5
--- dlg_module.h 14 Oct 2002 17:34:32 -0000 1.6
***************
*** 25,28 ****
--- 25,29 ----
#include "dlg_node.h"
#include "dlg_module_entry.h"
+ #include "kb_traverse.h"
/**
***************
*** 188,191 ****
--- 189,200 ----
*/
DlgModuleEntry *entry () { return &entry_; }
+
+ /**
+ * Get a pointer to the keyboard graph traversal helper. This keeps track
+ * of the current selection's siblings. Users can navigate through them
+ * via the arrow keys.
+ * @return the KBTraverse of this module
+ */
+ KBTraverse *traverse () { return &traverse_; }
protected:
***************
*** 204,208 ****
DlgModuleEntry entry_; // further content of the dialogue
!
private:
void init (); // initialize a newly constructed DlgModule
--- 213,218 ----
DlgModuleEntry entry_; // further content of the dialogue
!
! KBTraverse traverse_; // Keyboard graph traversal helper
private:
void init (); // initialize a newly constructed DlgModule
Index: gui_graph.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** gui_graph.cc 12 Oct 2002 18:51:33 -0000 1.4
--- gui_graph.cc 14 Oct 2002 17:34:32 -0000 1.5
***************
*** 253,257 ****
// no node at that position
if (node == NULL) return false;
! else return selectNode (node);
}
--- 253,259 ----
// no node at that position
if (node == NULL) return false;
! else module->traverse ()->select (node);
!
! return selectNode (node);
}
***************
*** 270,277 ****
// see if selected is arrow
if (selected->type () == LINK)
! selected = selected->next (FIRST);
!
// ... try to retrieve it's parent
! DlgNode *parent = ((DlgCircle *) selected)->parent (CURRENT);
// if we have it, then select it
--- 272,279 ----
// see if selected is arrow
if (selected->type () == LINK)
! selected = selected->prev (FIRST);
!
// ... try to retrieve it's parent
! DlgNode *parent = module->traverse ()->up ();
// if we have it, then select it
***************
*** 306,310 ****
// ... try to retrieve it's child
! DlgNode *child = ((DlgCircle *) selected)->child (FIRST);
// if we have it, then select it
--- 308,312 ----
// ... try to retrieve it's child
! DlgNode *child = module->traverse ()->down ();
// if we have it, then select it
***************
*** 334,337 ****
--- 336,341 ----
if (selected)
{
+ DlgNode *sibling;
+
// see if selected is arrow
if (selected->type () == LINK)
***************
*** 339,351 ****
// ... try to retrieve it's child
! DlgNode *sibling = ((DlgCircle *) selected)->sibling (pos);
- // if there is none in that direction, try to wrap around
- if (!sibling)
- {
- if (pos == PREV) sibling = ((DlgCircle *) selected)->sibling
(LAST);
- else sibling = ((DlgCircle *) selected)->sibling (FIRST);
- }
-
// if we have something now
if (sibling && sibling != selected)
--- 343,349 ----
// ... try to retrieve it's child
! if (pos == PREV) sibling = module->traverse ()->left ();
! else sibling = module->traverse ()->right ();
// if we have something now
if (sibling && sibling != selected)
***************
*** 365,380 ****
bool GuiGraph::selectRoot ()
{
! if (module->selectRoot ())
! {
! // update the instant preview
! GuiDlgedit::window->list ()->display (module->selected ());
!
! // update the program state
! GuiDlgedit::window->setMode (module->mode ());
!
! return true;
! }
!
! return false;
}
--- 363,367 ----
bool GuiGraph::selectRoot ()
{
! return selectNode (module->traverse ()->selectRoot (&module->getNodes
()));
}
Index: gui_graph.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/tools/dlgedit/gui_graph.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** gui_graph.h 13 Oct 2002 20:37:45 -0000 1.5
--- gui_graph.h 14 Oct 2002 17:34:32 -0000 1.6
***************
*** 265,269 ****
bool scrolling; // Indicates whether autoscrolling is active
DlgPoint scroll_offset; // Offset by which the view moves during scrolling
! bool updateBackground; // Don't show updates to the drawing area
};
--- 265,269 ----
bool scrolling; // Indicates whether autoscrolling is active
DlgPoint scroll_offset; // Offset by which the view moves during scrolling
! bool updateBackground; // Don't show updates to the drawing area
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src/tools/dlgedit kb_traverse.cc,NONE,1.1 kb_traverse.h,NONE,1.1 Makefile.am,1.46,1.47 dlg_module.h,1.5,1.6 gui_graph.cc,1.4,1.5 gui_graph.h,1.5,1.6,
Kai Sterker <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/doc/dlgedit dlgedit.dxt,1.6,1.7
- Next by Date:
[Adonthell-commits] CVS: adonthell/src/gui object_template.cc,NONE,1.1.2.1 object_template.h,NONE,1.1.2.1 Makefile.am,1.1.2.3,1.1.2.4 bin.cc,1.1.2.2,1.1.2.3 bin.h,1.1.2.2,1.1.2.3 border_template.cc,1.1.2.1,1.1.2.2 border_template.h,1.1.2.1,1.1.2.2 box.cc,1.1.2.2,1.1.2.3 button.cc,1.1.2.1,1.1.2.2 button_template.cc,1.1.2.1,1.1.2.2 button_template.h,1.1.2.1,1.1.2.2 container.cc,1.1.2.2,1.1.2.3 container.h,1.1.2.2,1.1.2.3 font.cc,1.1.2.1,1.1.2.2 font.h,1.1.2.1,1.1.2.2 theme.cc,1.1.2.1,1.1.2.2 theme.h,1.1.2.1,1.1.2.2 widget.cc,1.1.2.2,1.1.2.3 widget.h,1.1.2.2,1.1.2.3 window.cc,1.1.2.2,1.1.2.3
- Previous by thread:
[Adonthell-commits] CVS: adonthell/doc/dlgedit dlgedit.dxt,1.6,1.7
- Next by thread:
[Adonthell-commits] CVS: adonthell/src/gui object_template.cc,NONE,1.1.2.1 object_template.h,NONE,1.1.2.1 Makefile.am,1.1.2.3,1.1.2.4 bin.cc,1.1.2.2,1.1.2.3 bin.h,1.1.2.2,1.1.2.3 border_template.cc,1.1.2.1,1.1.2.2 border_template.h,1.1.2.1,1.1.2.2 box.cc,1.1.2.2,1.1.2.3 button.cc,1.1.2.1,1.1.2.2 button_template.cc,1.1.2.1,1.1.2.2 button_template.h,1.1.2.1,1.1.2.2 container.cc,1.1.2.2,1.1.2.3 container.h,1.1.2.2,1.1.2.3 font.cc,1.1.2.1,1.1.2.2 font.h,1.1.2.1,1.1.2.2 theme.cc,1.1.2.1,1.1.2.2 theme.h,1.1.2.1,1.1.2.2 widget.cc,1.1.2.2,1.1.2.3 widget.h,1.1.2.2,1.1.2.3 window.cc,1.1.2.2,1.1.2.3
- Index(es):