home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Megazine
/
Megazine-1.iso
/
PROGRAMA
/
C
/
CXTW106
/
CXTKEYS.CB
< prev
next >
Wrap
Text File
|
1996-12-01
|
6KB
|
136 lines
/*****************************************************************************/
/*
CXTKEYS.CB - BRIEF MACRO AUTOLOAD AND KEY ASSIGNMENT FOR
CSTN (TM) C STRUCTURE TREE NAVIGATOR
CFTN (TM) C FUNCTION TREE NAVIGATOR
Copyright (C) Juergen Mueller (J.M.) 1992-1995
All rights reserved.
You are expressly prohibited from selling this software in any form,
distributing it with another product, or removing this notice.
Limited permission is given to registered CXT users to modify this
file for their own personal use only. This file may not be used for any
purpose other than in conjunction with the CXT software package.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE
IMPLIED WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM AND DOCUMENTATION IS WITH YOU.
written by: Juergen Mueller, Aldingerstrasse 22, D-70806 Kornwestheim,
GERMANY
FILE : CXTKEYS.CB
REVISION : 26-Mar-1995
12:43:49
*/
/*****************************************************************************/
/*****************************************************************************/
/* INITIALIZATION */
/*****************************************************************************/
void _init(void)
{
/* Perform autoload of the macro file CXT [.CM] for the following macros. */
/* The macro file must be in the default BRIEF macro directory, */
/* otherwise the complete path must be specified here within "autoload()" */
autoload("cxt", "cft",
"cst",
"cftfind",
"cstfind",
"cftmenu",
"cstmenu",
"cftbase",
"cstbase",
"cxtbase",
"cftfilemenu",
"cstfilemenu",
"cxtsearchxref",
"cftxrefmenu",
"cftxrefmenuagain",
"cstxrefmenu",
"cstxrefmenuagain",
"cftdefmenu",
"cstdefmenu"
);
/* Assign keys to the available macro functions to simplify working */
/* if these key combinations are already used, switch to other ones */
/**** CFT functions ****/
/* SHIFT + <key> */
assign_to_key("<Shift-F1>", "cft");
assign_to_key("<Shift-F2>", "cftmenu");
assign_to_key("<Shift-F3>", "cftxrefmenu");
assign_to_key("<Shift-F4>", "cftxrefmenuagain");
assign_to_key("<Shift-F7>", "cftdefmenu");
assign_to_key("<Shift-F8>", "cftfilemenu");
assign_to_key("<Shift-F11>", "cftfind");
assign_to_key("<Shift-F12>", "cftbase");
/**** CST functions ****/
/* CTRL + <key> */
assign_to_key("<Ctrl-F1>", "cst");
assign_to_key("<Ctrl-F2>", "cstmenu");
assign_to_key("<Ctrl-F3>", "cstxrefmenu");
assign_to_key("<Ctrl-F4>", "cstxrefmenuagain");
assign_to_key("<Ctrl-F7>", "cstdefmenu");
assign_to_key("<Ctrl-F8>", "cstfilemenu");
assign_to_key("<Ctrl-F11>", "cstfind");
assign_to_key("<Ctrl-F12>", "cstbase");
/**** common used macros ****/
assign_to_key("<Alt-Tab>", "cxtbase");
assign_to_key("<Ctrl-Tab>", "cxtsearchxref");
}
/*****************************************************************************/
/* HELP-information */
/*****************************************************************************/
void cxthelp(void)
{
int help_buf, old_buf;
old_buf = inq_buffer(); /* remember actual buffer */
help_buf = create_buffer("HELP", "HELP");
set_buffer(help_buf); /* make actual buffer */
attach_buffer(help_buf); /* attach new buffer to window */
top_of_buffer(); /* go to top */
insert("CXT HELP INFORMATION\n\n");
insert("Complete list of all available macro functions with assigned key-combination\n");
insert("and macro-name. For more informations see the CFT & CST documentation.\n\n");
insert("CFT macro functions CST macro functions\n");
insert("<Shift-F1> cft <Ctrl-F1> cst\n");
insert("<Shift-F2> cftmenu <Ctrl-F2> cstmenu\n");
insert("<Shift-F3> cftxrefmenu <Ctrl-F3> cstxrefmenu\n");
insert("<Shift-F4> cftxrefmenuagain <Ctrl-F4> cstxrefmenuagain\n");
insert("<Shift-F7> cftdefmenu <Ctrl-F7> cstdefmenu\n");
insert("<Shift-F8> cftfilemenu <Ctrl-F8> cstfilemenu\n");
insert("<Shift-F11> cftfind <Ctrl-F11> cstfind\n");
insert("<Shift-F12> cftbase <Ctrl-F12> cstbase\n");
insert("\nAdditional macro function\n");
insert("<Alt-Tab> cxtbase\n");
insert("<Ctrl-Tab> cxtsearchxref\n");
insert("\nThis help screen is invoked by macro 'cxthelp'.\n");
insert("\npress RETURN to continue");
refresh(); /* update new screen */
while ((read_char() & 0xff) != 13) /* wait for RETURN key pressed */
;
set_buffer(old_buf); /* restore old buffer */
attach_buffer(old_buf); /* attach old buffer to window */
delete_buffer(help_buf); /* delete buffer from list */
}
/**** THIS IS THE END THIS IS THE END THIS IS THE END THIS IS THE END ****/