diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/PropSet.h | 56 | ||||
| -rw-r--r-- | include/SciLexer.h | 1 | ||||
| -rw-r--r-- | include/Scintilla.h | 5 | ||||
| -rw-r--r-- | include/Scintilla.iface | 11 | 
4 files changed, 63 insertions, 10 deletions
| diff --git a/include/PropSet.h b/include/PropSet.h index f3dbd4659..2aefcdbd8 100644 --- a/include/PropSet.h +++ b/include/PropSet.h @@ -60,6 +60,9 @@ public:  			return false;  		return strcmp(s, other.s) == 0;  	} +	bool operator!=(const SString &other) const { +		return !operator==(other); +	}  	bool operator==(const char *sother) const {  		if ((s == 0) && (sother == 0))  			return true; @@ -67,6 +70,9 @@ public:  			return false;  		return strcmp(s, sother) == 0;  	} +	bool operator!=(const char *sother) const { +		return !operator==(sother); +	}  	const char *c_str() const {  		if (s)  			return s; @@ -99,26 +105,55 @@ public:  		}  		return *this;  	} +	SString &operator +=(char ch) { +		int len = length(); +		char *sNew = new char[len + 1 + 1]; +		if (sNew) { +			if (s) +				memcpy(sNew, s, len); +			sNew[len] = ch; +			sNew[len + 1] = '\0'; +			delete []s; +			s = sNew; +		} +		return *this; +	}  	int value() const {  		if (s)  			return atoi(s);  		else   			return 0;  	} +	void substitute(char find, char replace) { +		char *t = s; +		while (t) { +			t = strchr(t, find); +			if (t) +				*t = replace; +		} +	} +	// I don't think this really belongs here -- Neil +	void correctPath() { +#ifdef unix +		substitute('\\', '/'); +#else +		substitute('/', '\\'); +#endif +	}  };  struct Property { -    unsigned int hash; +	unsigned int hash;  	char *key; -    char *val; -    Property *next; -    Property() : hash(0), key(0), val(0), next(0) {} +	char *val; +	Property *next; +	Property() : hash(0), key(0), val(0), next(0) {}  };  class PropSet {  private: -    enum { hashRoots=31 }; -    Property *props[hashRoots]; +	enum { hashRoots=31 }; +	Property *props[hashRoots];  public:  	PropSet *superPS;  	PropSet(); @@ -126,8 +161,8 @@ public:  	void Set(const char *key, const char *val);  	void Set(char *keyval);  	SString Get(const char *key); -    SString GetExpanded(const char *key); -    SString Expand(const char *withvars); +	SString GetExpanded(const char *key); +	SString Expand(const char *withvars);  	int GetInt(const char *key, int defaultValue=0);  	SString GetWild(const char *keybase, const char *filename);  	SString GetNewExpand(const char *keybase, const char *filename); @@ -143,11 +178,12 @@ public:  	char *list;  	int len;  	bool onlyLineEnds;	// Delimited by any white space or only line ends +	bool sorted;  	int starts[256];  	WordList(bool onlyLineEnds_ = false) :  -		words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_) {} +		words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_), sorted(false) {}  	~WordList() { Clear(); } -	operator bool() { return (list && list[0]) ? true : false; } +	operator bool() { return words ? true : false; }  	const char *operator[](int ind) { return words[ind]; }  	void Clear();  	void Set(const char *s); diff --git a/include/SciLexer.h b/include/SciLexer.h index a3a26b2d1..4671941f7 100644 --- a/include/SciLexer.h +++ b/include/SciLexer.h @@ -24,6 +24,7 @@  #define SCLEX_XCODE 13  #define SCLEX_LATEX 14  #define SCLEX_LUA 15 +#define SCLEX_DIFF 16  // Lexical states for SCLEX_PYTHON  #define SCE_P_DEFAULT 0 diff --git a/include/Scintilla.h b/include/Scintilla.h index a1494b41a..855b186d7 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -211,6 +211,7 @@ typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wPara  #define SCI_AUTOCSELECT SCI_START + 108  #define SCI_AUTOCSETCANCELATSTART SCI_START + 110  #define SCI_AUTOCGETCANCELATSTART SCI_START + 111 +#define SCI_AUTOCSETFILLUPS SCI_START + 112  #define SCI_GETTABWIDTH SCI_START + 121  #define SCI_SETINDENT SCI_START + 122 @@ -288,6 +289,9 @@ typedef long (*SciFnDirect)(long ptr, unsigned int iMessage, unsigned long wPara  #define SCI_GETDIRECTFUNCTION SCI_START + 184  #define SCI_GETDIRECTPOINTER SCI_START + 185 +#define SCI_SETOVERTYPE SCI_START + 186 +#define SCI_GETOVERTYPE SCI_START + 187 +  #define SCI_CALLTIPSHOW SCI_START + 200  #define SCI_CALLTIPCANCEL SCI_START + 201  #define SCI_CALLTIPACTIVE SCI_START + 202 @@ -458,6 +462,7 @@ typedef void (tMacroRecorder)(unsigned int iMessage, unsigned long wParam,  #endif  #define SCN_MARGINCLICK 2010  #define SCN_NEEDSHOWN 2011 +#define SCN_POSCHANGED 2012  // For compatibility, these go through the COMMAND notification rather than NOTIFY  // and have exactly the same values as the EN_* constants. diff --git a/include/Scintilla.iface b/include/Scintilla.iface index d80dfcce5..f742f7804 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -435,6 +435,9 @@ set void AutoCSetCancelAtStart=2110(bool cancel,)  # Retrieve whether auto-completion cancelled by backspacing before start.  get bool AutoCGetCancelAtStart=2111(,) +# Define a set of character that when typed fills up the selected word. +set void AutoCSetFillUps=2112(, string characterSet) +  # Set the number of spaces used for one level of indentation.  set void SetIndent=2122(int indentSize,) @@ -645,6 +648,12 @@ get int GetDirectFunction=2184(,)  # the function returned by GetDirectFunction.  get int GetDirectPointer=2185(,) +# Set to overtype (true) or insert mode +set void SetOvertype=2186(bool overtype,) + +# Returns true if overtype mode is active otherwise false is returned. +get bool GetOvertype=2187(,) +  # Show a call tip containing a definition near position pos.  fun void CallTipShow=2200(position pos, string definition) @@ -989,6 +998,7 @@ val SCN_MODIFIED=2008  val SCN_MACRORECORD=2009  val SCN_MARGINCLICK=2010  val SCN_NEEDSHOWN=2011 +val SCN_POSCHANGED=2012  # For compatibility, these go through the COMMAND notification rather than NOTIFY  # and have exactly the same values as the EN_* constants. @@ -1040,6 +1050,7 @@ val SCLEX_BATCH=12  val SCLEX_XCODE=13  val SCLEX_LATEX=14  val SCLEX_LUA=15 +val SCLEX_DIFF=16  val SCE_P_DEFAULT=0  val SCE_P_COMMENTLINE=1  val SCE_P_NUMBER=2 | 
