Menu

#145 TIP#167: Context help for Win32

TIP Implementation
open
5
2010-01-03
2003-11-19
Anonymous
No

Check TIP#167

Discussion

  • Nobody/Anonymous

    Implements TIP#167

     
  • Donal K. Fellows

    • summary: Patch for TIP#167 --> TIP#167: Context help for Win32
     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    Submitted by Ramon Rib <ramsan@cimne.upc.es>

     
  • Joe English

    Joe English - 2004-02-25

    Logged In: YES
    user_id=68433

    Wouldn't it be better to use virtual events for this?
    (<<Help>> instead of <Help>).

    This part worries me:

    #define HelpMask (1L << 31)

    Which means we've now run out of event mask bits...

     
  • Anton Kovalenko

    Anton Kovalenko - 2005-12-27

    Context-help generating virtual event

     
  • Anton Kovalenko

    Anton Kovalenko - 2005-12-27

    Logged In: YES
    user_id=241496

    I'm attaching the patch that uses <<Help>> virtual event
    instead of <Help>, to address the reasonable concern of Joe
    English.

    It seems, however, that it requires editing the TIP, and
    perhaps voting or re-voting on it, or something like this.
    If a half-year delay with contexthelp is inevitable due to
    all these things, I would prefer to run out of event mask
    bits :-)

     
  • Pat Thoyts

    Pat Thoyts - 2007-10-25

    Logged In: YES
    user_id=202636
    Originator: NO

    This patch doesn't work right. If a I test this then the clicks are passed through. So trying to get context help for a radio/checkbutton sets the button. On a normal button it clicks the button. On a text widget it sets the insert position etc. This should not happen - the click should be eaten by the help event. The cursor handling seems fine though.

     
  • Anton Kovalenko

    Anton Kovalenko - 2007-10-25

    Context help and (unfortunately) other good things

     
  • Anton Kovalenko

    Anton Kovalenko - 2007-10-25

    Logged In: YES
    user_id=241496
    Originator: NO

    I know that it doesn't work right. I have a working solution that is used in Tk builds for my own projects. Now I'm attaching tkchelp.diff in hope that someone has time to refine it and make its way to the core. Unfortunately I'm very short of time for 2 weeks or so, of course I'd done it myself otherwise.

    The solution to the context help problem used in the new patch is far from elegant, but it works and enabled me to solve another longstanding problem as well (see tkWinDialog.c: EatSpuriousMessageBugFix(); this function in the current CVS really doesn't do anything useful, while the patched version does).

    There are two other kinds of changes in the attached file: (1) wm attribute -shadow support for win32 - there was no TIP on it and no discussion, and (2) changes to tkUnixRFont.c for -underline font attribute support with Xft. At this moment I don't have enough time to isolate these changes and submit them separately and create a TIP for -shadow etc.etc. Sorry.

    File Added: tkchelp.diff

     
  • Anton Kovalenko

    Anton Kovalenko - 2007-10-25

    Logged In: YES
    user_id=241496
    Originator: NO

    PS. If someone has a courage to work with my code from the latest patch, refining it for inclusion into Tk, I'm ready to answer questions related to the code, either by SF e-mail or by Jabber: anton@jabber.ru. Some aspects of message handling in Tk on win32 are obscure; e.g. the current CVS version of EatSpuriousMessageBugFix() is evidently based on a wrong idea about mouse button event generation in Tk/win32. If any part of my code seems useless, please ask me first if possible; if it seems obscure, yeah, it is :(.

     
  • Donal K. Fellows

    • labels: 319062 -->
    • milestone: 352719 -->
     
  • Donal K. Fellows

    • labels: --> 68. Win Window Operations
    • milestone: --> TIP Implementation
     
  • Pat Thoyts

    Pat Thoyts - 2010-01-03

    The tkchelp.diff patch here is clearly older than the code in patch 2838812 which contains the same functionality wrapped up among other stuff.
    The same comments about multi-purpose patches applies. See the 0002-*.patch added to 2838812 for comparison with this feature.

     
  • Pat Thoyts

    Pat Thoyts - 2010-01-03
    • assigned_to: chengyemao --> patthoyts