home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_08
/
8n08106b
< prev
next >
Wrap
Text File
|
1990-07-18
|
796b
|
42 lines
Events and Windows
Richard Rathe MD
Listing 4
/*** text window activate method ***/
void t_activate(window,windinfo)
WindowPtr window;
WIND *windinfo;
{
TEHandle tehandle;
/* get data handle */
tehandle =
(TEHandle)windinfo->data;
/* activate event */
if(event.modifiers & activeFlag)
{
TEActivate(tehandle);
HiliteControl(((WindowPeek) window)
->controlList,ENABLE);
TEFromScrap();
enable_edit((**tehandle).selEnd
- (**tehandle).selStart);
enable_find();
}
else /* deactivate event */
{
TEDeactivate(tehandle);
HiliteControl(((WindowPeek) window)
->controlList,DISABLE);
ZeroScrap();
TEToScrap();
disable_edit();
disable_find();
}
}