wtext.h

Go to the documentation of this file.
00001 #ifndef __WTEXT_H__
00002 #define  __WTEXT_H__
00003 
00004 /*******************************************
00005  * Original source : GNUPLOT - win/wtext.h
00006  * modified for Scilab 
00007  *******************************************
00008  * Copyright (C) 1992   Russell Lang
00009  *
00010  * Permission to use, copy, and distribute this software and its
00011  * documentation for any purpose with or without fee is hereby granted, 
00012  * provided that the above copyright notice appear in all copies and 
00013  * that both that copyright notice and this permission notice appear 
00014  * in supporting documentation.
00015  *
00016  * Permission to modify the software is granted, but not the right to
00017  * distribute the modified code.  Modifications are to be distributed 
00018  * as patches to released version.
00019  *  
00020  * This software is provided "as is" without express or implied warranty.
00021  * 
00022  *
00023  * AUTHORS
00024  *   Russell Lang
00025  * Modified for Scilab 1997
00026  *   Jean-Philippe Chancelier 
00027  *   Allan CORNET (2003)
00028  */
00029 
00030 
00031 #include <string.h>             /* use only far items */
00032 #include <stdlib.h>
00033 #include <ctype.h>
00034 #include <WindowsX.h>
00035 
00036 
00037 #include "wresource.h"
00038 #include "resource.h"
00039 #include "wcommon.h"
00040 #include "version.h"
00041 
00042 
00043 /*-----------------------------------------------------------------------------------*/
00044 /* Les Definitions */
00045 /*-----------------------------------------------------------------------------------*/
00046 /**********************/
00047 /* Code Touches CTRL+Key */
00048 #define CTRLA           1
00049 #define CTRLB           2
00050 #define CTRLC           3
00051 #define CTRLD           4
00052 #define CTRLE           5
00053 #define CTRLF           6
00054 #define CTRLH           8
00055 #define CTRLK           11
00056 #define CTRLL           12
00057 #define CTRLN           14
00058 #define CTRLP           16
00059 #define CTRLU           21
00060 #define CTRLW           23
00061 
00062 /**********************/
00063 
00064 /* Taille du buffer circulaire des touches*/
00065 #define KeyBufferSize 256
00066 
00067 
00068 
00069 /* limits */
00070 #define MAXSTR 256
00071 
00072 #define NOTEXT 0xF0
00073 
00074 extern BOOL ConsoleIsMinimized ;
00075 
00076 /*-----------------------------------------------------------------------------------*/
00077 /* Les Fonctions */
00078 /*-----------------------------------------------------------------------------------*/
00079 
00080 EXPORT void WINAPI TextMessage (void);
00081 EXPORT int WINAPI TextInit (LPTW lptw);
00082 EXPORT void WINAPI TextClose (LPTW lptw);
00083 EXPORT void WINAPI TextToCursor (LPTW lptw);
00084 EXPORT int WINAPI TextPutCh (LPTW lptw, BYTE ch);
00085 EXPORT int WINAPI TextKBHit (LPTW lptw);
00086 EXPORT int WINAPI TextGetCh (LPTW lptw);
00087 EXPORT int WINAPI TextGetChE (LPTW lptw);
00088 EXPORT LPSTR WINAPI TextGetS (LPTW lptw, LPSTR str, unsigned int size);
00089 EXPORT int WINAPI TextPutS (LPTW lptw, LPSTR str);
00090 EXPORT void WINAPI TextGotoXY (LPTW lptw, int x, int y);
00091 EXPORT int WINAPI TextWhereX (LPTW lptw);
00092 EXPORT int WINAPI TextWhereY (LPTW lptw);
00093 EXPORT void WINAPI TextCursorHeight (LPTW lptw, int height);
00094 EXPORT void WINAPI TextClearEOL (LPTW lptw);
00095 EXPORT void WINAPI TextClearEOS (LPTW lptw);
00096 EXPORT void WINAPI TextInsertLine (LPTW lptw);
00097 EXPORT void WINAPI TextDeleteLine (LPTW lptw);
00098 EXPORT void WINAPI TextScrollReverse (LPTW lptw);
00099 void NewLine (LPTW lptw);
00100 void UpdateText (LPTW lptw, int count);
00101 void TextPutStr (LPTW lptw, LPSTR str);
00102 void ReadRegistryTxt (LPTW lptw);
00103 void LimitMark (LPTW lptw, POINT FAR * lppt);
00104 void ClearMark (LPTW lptw, POINT pt);
00105 void DoLine (LPTW lptw, HDC hdc, int xpos, int ypos, int offset, int count);
00106 void DoMark (LPTW lptw, POINT pt, POINT end, BOOL mark);
00107 void UpdateMark (LPTW lptw, POINT pt);
00108 void TextCopyClip (LPTW lptw);
00109 void TextMakeFont (LPTW lptw);
00110 void TextSelectFont (LPTW lptw);
00111 int CtrlCHit (LPTW lptw);
00112 /*--------------------------*/
00113 void ResizeScreenBuffer(LPTW lptw);
00114 void ReAllocScreenBuffer(LPTW lptw);
00115 void InitScreenBuffer(LPTW lptw);
00116 void ReorganizeScreenBuffer(LPTW lptw);
00117 void ClearCommandWindow(LPTW lptw,BOOL Clearfirstline);
00118 void ClearLinesScreenConsole(int NbrOfLines);
00119 void CleanClipboard(LPTW lptw);
00120 void SelectAll(LPTW lptw,BOOL DoAMark);
00121 void UnSelect(LPTW lptw);
00122 void HelpOn(LPTW lptw);
00123 void OpenSelection(LPTW lptw);
00124 void CutSelection(LPTW lptw);
00125 void EvaluateSelection(LPTW lptw);
00126 void OnRightClickMenu(LPTW lptw);
00127 void InvalidateCursor( void ); 
00128 BOOL HasAZoneTextSelected(LPTW lptw);
00129 DWORD WINAPI SendInputText(LPVOID lpParam );
00130 void CleanPromptFromText(char *Text);
00131 /*--------------------------*/
00132 int ReplacePrompt(char *Text,char *prompt);
00133 /* retourne TRUE si Text a été modifié */
00134 /*--------------------------*/
00135 void ForceToActiveWindowParent(void);
00136 void PrintSelectionGUI(LPTW lptw,char *Entete);
00137 void ExitWindow(void);
00138 void write_scilab_synchro(char *line);
00139 DWORD WINAPI WriteTextThread(LPVOID lpParam);
00140 BOOL WriteIntoScilab(LPTW lptw,char *StringCommand);
00141 void WriteIntoKeyBuffer(LPTW lptw,char *StringCommand);
00142 BOOL IsToThePrompt(void);
00143 void EnableNMenus(LPTW lptw,int numbermenus);
00144 void EnableMenus(LPTW lptw);
00145 void DisableMenus(LPTW lptw);
00146 void EnableToolBar(LPTW lptw);
00147 void DisableToolBar(LPTW lptw);
00148 /*--------------------------*/
00149 int GetCurrentLanguage(void);
00150 /*--------------------------*/
00151 #endif /*  __WTEXT_H__ */

Generated on Sun Mar 4 15:03:55 2007 for Scilab [trunk] by  doxygen 1.5.1