[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-users] PG_CURSOR_MODE in documentation?
From: |
Paul Gaynor |
Subject: |
Re: [paragui-users] PG_CURSOR_MODE in documentation? |
Date: |
Mon, 02 Jan 2006 19:02:17 -0700 |
Hi Ulf,
Thanks for the reply, I am looking to do something else with the pointer
other than hw/sw modes.
This is what I am looking at.
from pgapplication.h:492
//! Set or query the type of mouse cursor to use.
/*!
This function is used to set or query the type of mouse cursor used.
See the documentation for PG_CURSOR_MODE for more details.
\param mode the new mode for the request
\return the previous cursor mode
*/
static CursorMode ShowCursor(CursorMode mode);
in the example:
app.SetCursor(app.GetTheme()->FindSurface("Pointer", "Pointer",
"normal"));
>From what I can tell this is associated to this in the theme
<widget>
<type value="Pointer"/>
<object>
<name value="Pointer"/>
<filename name="normal" value="ccs/pointer.png"/>
</object>
</widget>
So my question comes in about the "normal" pointer. I don't see
anything about another type of pointer. I also can't find any reference
to "normal" XML theme in the source code for the pointer.
What I am ultimately looking to do is to have the click spot be in the
center of the "pointer" image instead of the top-left.
I am pretty sure I could hack my way through it but if this is already
available in the library that would be quicker. ;)
What do you think?
-Paul
On Mon, 2006-01-02 at 23:44 +0100, Ulf Lorenz wrote:
> On Sat, Dec 31, 2005 at 04:53:01PM -0700, Paul Gaynor wrote:
> > Hi,
> >
> > How does PG_CURSOR_MODE work? I can't seem to find anything about it
> > in the docs or source?
>
> 1. Call PG_Application::ShowCursor with on eof the arguments (enum
> within PG_Application, i.e. always prepend a PG_Application::)
>
> QUERY - returns the current cursor handling
> NONE - completely disables cursor drawing. You won't see any
> trace of the mouse cursor
> HARDWARE - uses the standard cursor form SDL
> SOFTWARE - paragui draws the cursor
>
> 2. In the case you want to use paragui's cursor drawing, you then call
> PG_Application::SetCursor and give it the image of your cursor.
>
> Quite straight forward, isn't it?
>
> Some notes:
>
> a) There are some updating issues with the paragui cursor, so it may
> happen that you see some artifacts where the cursor was when you hide a
> window or so (I can't tell you exactly, it is too long ago when I
> disabled it. :)
>
> b) You can also use the SDL functions to specify an own cursor. See
> SDL_SetCursor etc. in SDL_mouse.h. The drawback is that SDL can only do
> three colours: black, white and transparent.
>
>
> Ulf
>