Re: [AD] new mouse focus patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Mon, 2004-07-12 at 11:37 -0500, allegrovp@xxxxxxxxxx wrote:
> Following Elias' comments, here is a new patch which renames the flag to its logical opposite, and makes the patch more intuitive.
> 
> I had a look at my code this weekend (I originally wrote this patch months ago) and noticed that I wasn't using it for the example I gave :) In fact, I have two patches to that function, one of which had been rejected already (the MOUSEBLIND one).
> 
> So, this new message is used by map map pin widgets, which are pins that are placed on the minimap of the area, and that the user can drag and drop. These are pin-shaped, not rectangular.
> 
> Anyway, here's the new patch:
> 

Thanks, I'll commit it, along with the attached docs patch.

-- 
Elias Pschernig
Index: docs/src/allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.232
diff -u -r1.232 allegro._tx
--- docs/src/allegro._tx	11 Jul 2004 13:59:43 -0000	1.232
+++ docs/src/allegro._tx	12 Jul 2004 17:37:26 -0000
@@ -8059,16 +8059,18 @@
 
 The dialog procedure should return one of the values:
 <textblock>
-   D_O_K          - normal return status
-   D_CLOSE        - tells the dialog manager to close the dialog
-   D_REDRAW       - tells the dialog manager to redraw the entire
-		    dialog
-   D_REDRAWME     - tells the dialog manager to redraw the current
-		    object
-   D_WANTFOCUS    - requests that the input focus be given to this
-		    object
-   D_USED_CHAR    - MSG_CHAR and MSG_XCHAR return this if they used
-		    the key
+   D_O_K           - normal return status
+   D_CLOSE         - tells the dialog manager to close the dialog
+   D_REDRAW        - tells the dialog manager to redraw the entire
+		     dialog
+   D_REDRAWME      - tells the dialog manager to redraw the current
+		     object
+   D_WANTFOCUS     - requests that the input focus be given to this
+		     object
+   D_USED_CHAR     - MSG_CHAR and MSG_XCHAR return this if they used
+		     the key
+   D_DONTWANTMOUSE - Respond this to MSG_WANTMOUSE if the object
+                     does not want mouse focus.
 <endblock>
 Dialog procedures may be called with any of the messages:
 
@@ -8134,6 +8136,14 @@
    return D_WANTFOCUS if it does, or D_O_K if it isn't interested in getting 
    user input.
 
+<b>MSG_WANTMOUSE:</b><br>
+   Before changing the mouse focus, this message is used to determine which
+   dialog objects want to receive mouse focus at all. If an object returns
+   D_DONTWANTMOUSE instead of D_O_K, then it will not receive the focus.
+   This is useful if, for example, the object is not shaped like a
+   rectangle. In this case, you can return D_O_K if the mouse is over the
+   actual shape of the object, and D_DONTWANTMOUSE if it is not.
+
 <b>MSG_GOTFOCUS:</b><br>
 <b>MSG_LOSTFOCUS:</b><br>
    Sent whenever an object gains or loses the input focus. These messages 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/