1. wxEuphoria setMousePointer

Is there an equivalent of Win32Lib's setMousePointer() procedure in wxEuphoria?

I just downloaded the latest version of wxEuphoria, but I could not find it
anywhere. If it isn't there, will it be difficult to add it?

I also noticed that the client.exw and server.exw demos crash because of a small
commenting error on line 1411 in wxNet.e

I really like what I have seen about wxEuphoria so far and if I can get the
mousepointer thing to work, I will try to convert my EuSudoku game from Win32Lib
to wxEuphoria, so it will be cross-platform.

Thanks,
         Erik-Jan

new topic     » topic index » view message » categorize

2. Re: wxEuphoria setMousePointer

Erik-Jan van Kampen wrote:
> 
> Is there an equivalent of Win32Lib's setMousePointer() procedure in
> wxEuphoria?
> 
> I just downloaded the latest version of wxEuphoria, but I could not find it
> anywhere. If it isn't there, will it be difficult to add it?

It is there, just really, really poorly documented.  You need to create a
wxCursor (which you can find in the docs under Classes), and then use
set_cursor( window, cursor ) (which isn't documented at all).  I'll add the
docs for set_cursor() to Controls for the next release.
 
> I also noticed that the client.exw and server.exw demos crash because of a
> small
> commenting error on line 1411 in wxNet.e

Thanks, I'll get that fixed for the next release.


> I really like what I have seen about wxEuphoria so far and if I can get the
> mousepointer thing to work, I will try to convert my EuSudoku game from
> Win32Lib
> to wxEuphoria, so it will be cross-platform.
> 

Thanks.  Please let me know if you find anything else that you think is missing
or wrong.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

3. Re: wxEuphoria setMousePointer

Matt Lewis wrote:
> 
> Erik-Jan van Kampen wrote:
> > 
> > Is there an equivalent of Win32Lib's setMousePointer() procedure in
> > wxEuphoria?
> > 
> > I just downloaded the latest version of wxEuphoria, but I could not find it
> > anywhere. If it isn't there, will it be difficult to add it?
> 
> It is there, just really, really poorly documented.  You need to create a
> wxCursor (which you can find in the docs under Classes), and then use
> set_cursor( window, cursor ) (which isn't documented at all).  I'll add the
> docs for set_cursor() to Controls for the next release.
>  
> > I also noticed that the client.exw and server.exw demos crash because of a
> > small
> > commenting error on line 1411 in wxNet.e
> 
> Thanks, I'll get that fixed for the next release.
> 
> 
> > I really like what I have seen about wxEuphoria so far and if I can get the
> > mousepointer thing to work, I will try to convert my EuSudoku game from
> > Win32Lib
> > to wxEuphoria, so it will be cross-platform.
> > 
> 
> Thanks.  Please let me know if you find anything else that you think is
> missing
> or wrong.
> 
> Matt Lewis


Thanks for you quick reply Matt.

I have found the set_cursor function and was able to change the cursor into one
of the predefined cursors, without problems.

Next I would like to create a custom cursor, for example from xpm data. After
some research in the wxwidgets manuals, I know there is a constructor for the
wxCursor class that takes a wxImage as an argument. A wxImage can be created from
a wxBitmap using wxBitmap::ConverToImage().

From the connect4_game.exw demo I know how to create a wxBitmap from xpm data,
 but I can't figure out how to convert the wxBitmap to a wxImage and then to a
 wxCursor in wxEuphoria.

What's the best approach to get this done in wxEuphoria?

Erik-Jan

new topic     » goto parent     » topic index » view message » categorize

4. Re: wxEuphoria setMousePointer

Erik-Jan van Kampen wrote:
> 
> I have found the set_cursor function and was able to change the cursor into
> one of the predefined cursors, without problems.
> 
> Next I would like to create a custom cursor, for example from xpm data. After
> some research in the wxwidgets manuals, I know there is a constructor for the
> wxCursor class that takes a wxImage as an argument. A wxImage can be created
> from a wxBitmap using wxBitmap::ConverToImage().
> 
>  From the connect4_game.exw demo I know how to create a wxBitmap from xpm
>  data,
> but I can't figure out how to convert the wxBitmap to a wxImage and then to
> a wxCursor in wxEuphoria. 
> 
> What's the best approach to get this done in wxEuphoria?
> 

There appears to be a constructor for wxImage that takes a wxBitmap.  However,
this is deprecated, and it isn't exported from the windows dll.  As for
wxBitmap::ConvertToImage(), it returns the wxImage by value, so it will 
require tweaking the wxWidgets source to get this to work for wxEuphoria.

I'll see if I can do this and get a release out today or [probably] tomorrow.
I'm guessing that you're working from Windows, correct?

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

5. Re: wxEuphoria setMousePointer

Matt Lewis wrote:
> 
> Erik-Jan van Kampen wrote:
> > 
> > I have found the set_cursor function and was able to change the cursor into
> > one of the predefined cursors, without problems.
> > 
> > Next I would like to create a custom cursor, for example from xpm data.
> > After
> > some research in the wxwidgets manuals, I know there is a constructor for
> > the
> > wxCursor class that takes a wxImage as an argument. A wxImage can be created
> > from a wxBitmap using wxBitmap::ConverToImage().
> > 
> >  From the connect4_game.exw demo I know how to create a wxBitmap from xpm
> >  data,
> > but I can't figure out how to convert the wxBitmap to a wxImage and then to
> > a wxCursor in wxEuphoria. 
> > 
> > What's the best approach to get this done in wxEuphoria?
> > 
> 
> There appears to be a constructor for wxImage that takes a wxBitmap.  However,
> this is deprecated, and it isn't exported from the windows dll.  As for
> wxBitmap::ConvertToImage(), it returns the wxImage by value, so it will 
> require tweaking the wxWidgets source to get this to work for wxEuphoria.
> 
> I'll see if I can do this and get a release out today or [probably] tomorrow.
> I'm guessing that you're working from Windows, correct?
> 
> Matt Lewis


Thanks for looking into this.

I am indeed working from Windows (XP Home sp2)

Erik-Jan

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu