FLTK logo

Re: [fltk.general] What is the right way to do these shortcuts?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: What is the right way to do these shortcuts? "lifeatt... May 12, 2021  
  >Also, I'm not sure you should be doing anything with FL_FOCUS. If you want the cell to light up when you 
>hover over it, use FL_ENTER and FL_LEAVE instead, that might be what you want -- I'm not sure.

A valid point about cell highlighting. But in the OP's pseudo-code there is this section:

case FL_KEYBOARD:
switch(s) {
case S_NORM:{ block-specific vars defined here; if k is alpha {do stuff;cell->redraw();} ...

So FL_FOCUS/FL_UNFOCUS handling is necessary to receive keyboard events.

By not calling FL_BOX::handle() in Cell::handle(), the app/main function is likely not receiving the CTRL+S shortcut 
for the save menu. [Unless my understanding of events is wrong]

Kevin

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/f8ddf84a-0776-46a7-af15-8455a25f4f28n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.