a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Other:
 texteditor.gadget
  GA_TEXTEDITOR_AreaMarked
  GA_TEXTEDITOR_ColorMap
  GA_TEXTEDITOR_Contents
  GA_TEXTEDITOR_CursorX
  GA_TEXTEDITOR_CursorY
  GA_TEXTEDITOR_DoubleClickHook
  GA_TEXTEDITOR_ExportHook
  GA_TEXTEDITOR_ExportWrap
  GA_TEXTEDITOR_FixedFont
  GA_TEXTEDITOR_Flow
  GA_TEXTEDITOR_HasChanged
  GA_TEXTEDITOR_ImportHook
  GA_TEXTEDITOR_ImportWrap
  GA_TEXTEDITOR_InVirtualGroup
  GA_TEXTEDITOR_InsertMode
  GA_TEXTEDITOR_Pen
  GA_TEXTEDITOR_Prop_DeltaFactor
  GA_TEXTEDITOR_Prop_Entries
  GA_TEXTEDITOR_Prop_First
  GA_TEXTEDITOR_Prop_Visible
  GA_TEXTEDITOR_Quiet
  GA_TEXTEDITOR_ReadOnly
  GA_TEXTEDITOR_RedoAvailable
  GA_TEXTEDITOR_Separator
  GA_TEXTEDITOR_Slider
  GA_TEXTEDITOR_StyleBold
  GA_TEXTEDITOR_StyleItalic
  GA_TEXTEDITOR_StyleUnderline
  GA_TEXTEDITOR_TypeAndSpell
  GA_TEXTEDITOR_UndoAvailable
  GA_TEXTEDITOR_WrapBorder
  GM_TEXTEDITOR_ARexxCmd
  GM_TEXTEDITOR_ClearText
  GM_TEXTEDITOR_ExportBlock
  GM_TEXTEDITOR_ExportText
  GM_TEXTEDITOR_HandleError
  GM_TEXTEDITOR_InsertText
  GM_TEXTEDITOR_MacroBegin
  GM_TEXTEDITOR_MacroEnd
  GM_TEXTEDITOR_MacroExecute
  GM_TEXTEDITOR_MarkText
  GM_TEXTEDITOR_Search
  OM_TEXTEDITOR_Replace
  texteditor.gadget
Include
GuruMeditation
Docs » Autodocs » texteditor.gadget » GA_TEXTEDITOR_DoubleClickHook

NAME

        GA_TEXTEDITOR_DoubleClickHook -- [IS.], struct Hook *

FUNCTION

        If you use the gadget in ReadOnly mode then you may want a special
action to take place when the user doubleclick certain words.
For example a mail or news client, using this gadget to show mails,
may want the user to be able to click on URL's to lookup the link.
The hook will be called with A1 pointing to a ClickMessage, and A0
will point to the hook itself.
Your hook should return TRUE if it wants to stop the editor from
blocking.

EXAMPLE

        /* This hook will test if the user doubleclicked an http address */
BOOL URLHookCode (register __a1 struct ClickMessage *clickmsg)
{
UWORD pos = clickmsg->ClickPosition;
while(pos && *(clickmsg->LineContents+pos-1) != ' ' && *(clickmsg->LineContents+pos-1) != '<')
{
pos--;
}
if(strncmp(clickmsg->LineContents+pos, "http:", 5))
{
return(FALSE);
}
LookupURL(clickmsg->LineContents+pos);
return(TRUE);
}

SEE ALSO

GA_TEXTEDITOR_ReadOnly(), mui/TextEditor_mcc.h

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Dual Crew

DC
FLT
TBL
TSL

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se