本文整理汇总了C++中StyleContext::ForwardSetState方法的典型用法代码示例。如果您正苦于以下问题:C++ StyleContext::ForwardSetState方法的具体用法?C++ StyleContext::ForwardSetState怎么用?C++ StyleContext::ForwardSetState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StyleContext
的用法示例。
在下文中一共展示了StyleContext::ForwardSetState方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ForwardDefaultState
static void ForwardDefaultState(StyleContext& sc, int activeState)
{
if (activeState == 0)
sc.ForwardSetState(SCE_MYSQL_DEFAULT);
else
sc.ForwardSetState(SCE_MYSQL_HIDDENCOMMAND);
}
示例2: ColouriseTADSHTMLString
static void ColouriseTADSHTMLString(StyleContext &sc, int &lineState) {
int endState = sc.state;
int chQuote = sc.ch;
int chString = (lineState & T3_SINGLE_QUOTE) ? '\'' : '"';
if (endState == SCE_T3_HTML_STRING) {
if (lineState&T3_SINGLE_QUOTE) {
endState = SCE_T3_S_STRING;
chString = '\'';
} else if (lineState&T3_INT_EXPRESSION) {
endState = SCE_T3_X_STRING;
chString = '"';
} else {
endState = SCE_T3_HTML_DEFAULT;
chString = '"';
}
chQuote = (lineState & T3_HTML_SQUOTE) ? '\'' : '"';
} else {
sc.SetState(SCE_T3_HTML_STRING);
sc.Forward();
}
if (chQuote == '"')
lineState &= ~T3_HTML_SQUOTE;
else
lineState |= T3_HTML_SQUOTE;
while (sc.More()) {
if (IsEOL(sc.ch, sc.chNext)) {
return;
}
if (sc.ch == chQuote) {
sc.ForwardSetState(endState);
return;
}
if (sc.Match('\\', static_cast<char>(chQuote))) {
sc.Forward(2);
sc.SetState(endState);
return;
}
if (sc.ch == chString) {
sc.SetState(SCE_T3_DEFAULT);
return;
}
if (sc.Match('<', '<')) {
lineState |= T3_INT_EXPRESSION | T3_INT_EXPRESSION_IN_TAG;
sc.SetState(SCE_T3_X_DEFAULT);
sc.Forward(2);
return;
}
if (sc.Match('\\', static_cast<char>(chQuote))
|| sc.Match('\\', static_cast<char>(chString))
|| sc.Match('\\', '\\')) {
sc.Forward(2);
} else {
sc.Forward();
}
}
}
示例3: ColouriseContext
static void ColouriseContext(StyleContext& sc, char chEnd, int stateEOL) {
while (!sc.atLineEnd && !sc.Match(chEnd)) {
sc.Forward();
}
if (!sc.atLineEnd) {
sc.ForwardSetState(SCE_ADA_DEFAULT);
} else {
sc.ChangeState(stateEOL);
}
}
示例4: switch
static void ColouriseTADS3MsgParam(StyleContext &sc, int &lineState) {
int endState = sc.state;
int chQuote = '"';
switch (endState) {
case SCE_T3_S_STRING:
sc.SetState(SCE_T3_MSG_PARAM);
sc.Forward();
chQuote = '\'';
break;
case SCE_T3_D_STRING:
case SCE_T3_X_STRING:
sc.SetState(SCE_T3_MSG_PARAM);
sc.Forward();
break;
case SCE_T3_MSG_PARAM:
if (lineState&T3_SINGLE_QUOTE) {
endState = SCE_T3_S_STRING;
chQuote = '\'';
} else if (lineState&T3_INT_EXPRESSION) {
endState = SCE_T3_X_STRING;
} else {
endState = SCE_T3_D_STRING;
}
break;
}
while (sc.More() && sc.ch != '}' && sc.ch != chQuote) {
if (IsEOL(sc.ch, sc.chNext)) {
return;
}
if (sc.ch == '\\') {
sc.Forward();
}
sc.Forward();
}
if (sc.ch == chQuote) {
sc.SetState(endState);
} else {
sc.ForwardSetState(endState);
}
}
示例5: ColouriseDelimiter
static void ColouriseDelimiter(StyleContext& sc, bool& apostropheStartsAttribute) {
apostropheStartsAttribute = sc.Match (')');
sc.SetState(SCE_SPICE_DELIMITER);
sc.ForwardSetState(SCE_SPICE_DEFAULT);
}
示例6: ColouriseWhiteSpace
static void ColouriseWhiteSpace(StyleContext& sc, bool& ) {
sc.SetState(SCE_SPICE_DEFAULT);
sc.ForwardSetState(SCE_SPICE_DEFAULT);
}
示例7: ColouriseWhiteSpace
static void ColouriseWhiteSpace(StyleContext& sc, bool& /*apostropheStartsAttribute*/) {
// Apostrophe meaning is not changed, but the parameter is present for uniformity
sc.SetState(SCE_ADA_DEFAULT);
sc.ForwardSetState(SCE_ADA_DEFAULT);
}
示例8:
inline static void ColouriseTADS3Operator(StyleContext &sc) {
int initState = sc.state;
int c = sc.ch;
sc.SetState(c == '{' || c == '}' ? SCE_T3_BRACE : SCE_T3_OPERATOR);
sc.ForwardSetState(initState);
}