GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 22-Oct-2009, 14:27
rc3 rc3 is offline
New Member
 
Join Date: Oct 2009
Posts: 6
rc3 will become famous soon enough

Fl_Help_View makes mouse cursor appear


Hi all,

I am developing an application that runs on a 8" touch screen using fltk 1.1.

In my application I create two Fl_Group: main_group which is the main interface, containing only buttons and some labels; help_group which has an exit button and a Fl_Help_View widget which loads an external html file. When the main window shows (with main_group being visible and help_group hidden), I use the following code to hide mouse cursor from Xorg:
fl_cursor(FL_CURSOR_NONE, FL_BLACK, FL_WHITE)
This works as expected --- no black cross cursor shows on the screen. But as soon as I activate the help_group, the mouse cursor appears, and it won't go away even I go back to the main_group [ by main_group->show(); help_group->hide() ] , the mouse cursor remains on the screen. I can make the cursor disappear after going back to the main_group by calling the same fl_cursor() above after help_group->hide(). But the cursor still remains on help_group whenever help_group is made visible. I think the the problem is caused by Fl_Group_View but I don't know if it's posible to make the cursor disappear completely. Any suggestions/help is appreaciated.
  #2  
Old 27-Oct-2009, 10:05
rc3 rc3 is offline
New Member
 
Join Date: Oct 2009
Posts: 6
rc3 will become famous soon enough

Re: Fl_Help_View makes mouse cursor appear


OK maybe my question is too complicated. Let me simplify it to:
How can I make cursor invisible in Fl_Help_View?
  #3  
Old 27-Oct-2009, 13:45
rc3 rc3 is offline
New Member
 
Join Date: Oct 2009
Posts: 6
rc3 will become famous soon enough

Re: Fl_Help_View makes mouse cursor appear


After looking at the source code of Fl_Help_View, I came up with this (not quite perfect yet) solution:

CPP / C++ / C Code:
class SHelp_View: public Fl_Help_View {
    int handle(int e) {
        fl_cursor(FL_CURSOR_NONE, FL_BLACK, FL_WHITE);
        return Fl_Group::handle(e);  // cannot use Fl_Help_View::handle(e) 
                          //here since Fl_Help_View::handle(e) is private
    }
public:
  SHelp_View(int x, int y, int w, int h) :
    Fl_Help_View(x,y,w,h) {
    }
};


It makes the cursor disappear completely -- that's exactly what I want. But links in the Fl_Help_View window are no longer working since I cannot call the private Fl_Help_View::handle(e) method in the subclass. I don't know why Fl_Help_View makes handle() private [ it's the case in both fltk 1.1 and fltk2 ] because I have worked with Fl_Button, Fl_Box and handle() is defined as public in them.
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating Window Procedure mouse WPARAM from Hooks seaders MS Visual C++ / MFC Forum 0 24-Mar-2009 09:42
Detecting keyboard and mouse sameer.nalawade C Programming Language 0 22-Nov-2008 00:35
Bad buy: Gigabyte Mouse Model GM-M5000 admin Computer Hardware Forum 2 22-Oct-2007 18:57
How to move with mouse, drawn line. stormlab C++ Forum 0 01-Apr-2006 12:20
[Program/Tutorial] RandMouse aaroncohn C Programming Language 5 17-Dec-2004 19:22

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:54.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.