You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(30) |
Aug
(6) |
Sep
(3) |
Oct
(1) |
Nov
(13) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(17) |
Mar
(7) |
Apr
(10) |
May
(34) |
Jun
(17) |
Jul
(150) |
Aug
(59) |
Sep
(186) |
Oct
(57) |
Nov
(45) |
Dec
(22) |
2005 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(24) |
May
(10) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(35) |
Nov
(12) |
Dec
(1) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(1) |
Dec
|
From: <moo...@us...> - 2004-03-15 09:13:28
|
Update of /cvsroot/anyedit/AnyEditBin/Config/Default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19363/Config/Default Modified Files: AnyEdit.cfg Log Message: Small bug fix Index: AnyEdit.cfg =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/AnyEdit.cfg,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AnyEdit.cfg 15 Mar 2004 09:00:48 -0000 1.3 --- AnyEdit.cfg 15 Mar 2004 09:04:21 -0000 1.4 *************** *** 56,59 **** --- 56,60 ---- <SyntaxFile>pascal.syn</SyntaxFile> <Extensions>pas,dpr,dpk,dfm,inc,pp</Extensions> + </Language> </Languages> </Config> |
From: <moo...@us...> - 2004-03-15 09:09:57
|
Update of /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17779/Config/Default/Syntax Added Files: css.syn html.syn pascal.syn xml.syn Log Message: Default Config and Language update - Changed Layout of the Default config - Added Syntax Files for CSS, HTML, XML and Pascal - New executable to handle the new config file. --- NEW FILE: css.syn --- <Syntax> <Lexer> <Name>SCLEX_CSS</Name> <Property name="fold.comment">1</Property> <Property name="fold.compact">1</Property> </Lexer> <View> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <CodeHighlight> <SyntaxHighlighting>1</SyntaxHighlighting> <HighlightCurrentLine>1</HighlightCurrentLine> <BraceMatching>1</BraceMatching> </CodeHighlight> <AutoComp> <AutoCompletion>0</AutoCompletion> <CodeCompletion>0</CodeCompletion> <AutoCompKey>0</AutoCompKey> </AutoComp> <ClassView> <ClassViewOn>1</ClassViewOn> <SortClassView>1</SortClassView> <ParserDelay>1500</ParserDelay> </ClassView> <Indent> <Indent>1</Indent> <IndentSize>4</IndentSize> <AutoIndent>0</AutoIndent> <IndentGuides>1</IndentGuides> </Indent> <Margins> <LineNumbers>1</LineNumbers> <BookMark>1</BookMark> <Fold>1</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="0"> <Name>Whitespace</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="34"> <Name>Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="35"> <Name>Bad Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="1"> <Name>Tag</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>800000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="2"> <Name>Class</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>800000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="3"> <Name>Pseudo Class</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>800000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="4"> <Name>Unknown Pseudo Class</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="5"> <Name>Operator</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="6"> <Name>Identifier</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="7"> <Name>Unknown Identifier</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="8"> <Name>Value</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>800080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="9"> <Name>Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="10"> <Name>ID</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>800000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="11"> <Name>Important</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="12"> <Name>Directive</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>008000</Foreground> <Background>E0C0E0</Background> </Color> </Style> <Style number="13"> <Name>Double Quoted String</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="14"> <Name>Single Quoted String</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Keywords set="0"> <Word>ascent</Word> <Word>azimuth</Word> <Word>background</Word> <Word>background-attachment</Word> <Word>background-color</Word> <Word>background-image</Word> <Word>background-position</Word> <Word>background-repeat</Word> <Word>baseline</Word> <Word>bbox</Word> <Word>border</Word> <Word>border-collapse</Word> <Word>border-color</Word> <Word>border-spacing</Word> <Word>border-style</Word> <Word>border-top</Word> <Word>border-right</Word> <Word>border-bottom</Word> <Word>border-left</Word> <Word>border-top-color</Word> <Word>border-right-color</Word> <Word>border-bottom-color</Word> <Word>border-left-color</Word> <Word>border-top-style</Word> <Word>border-right-style</Word> <Word>border-bottom-style</Word> <Word>border-left-style</Word> <Word>border-top-width</Word> <Word>border-right-width</Word> <Word>border-bottom-width</Word> <Word>border-left-width</Word> <Word>border-width</Word> <Word>bottom</Word> <Word>cap-height</Word> <Word>caption-side</Word> <Word>centerline</Word> <Word>clear</Word> <Word>clip</Word> <Word>color</Word> <Word>content</Word> <Word>counter-increment</Word> <Word>counter-reset</Word> <Word>cue</Word> <Word>cue-after</Word> <Word>cue-before</Word> <Word>cursor</Word> <Word>definition-src</Word> <Word>descent</Word> <Word>direction</Word> <Word>display</Word> <Word>elevation</Word> <Word>empty-cells</Word> <Word>float</Word> <Word>font</Word> <Word>font-family</Word> <Word>font-size</Word> <Word>font-size-adjust</Word> <Word>font-stretch</Word> <Word>font-style</Word> <Word>font-variant</Word> <Word>font-weight</Word> <Word>height</Word> <Word>left</Word> <Word>letter-spacing</Word> <Word>line-height</Word> <Word>list-style</Word> <Word>list-style-image</Word> <Word>list-style-position</Word> <Word>list-style-type</Word> <Word>margin</Word> <Word>margin-top</Word> <Word>margin-right</Word> <Word>margin-bottom</Word> <Word>margin-left</Word> <Word>marker-offset</Word> <Word>marks</Word> <Word>mathline</Word> <Word>max-height</Word> <Word>max-width</Word> <Word>min-height</Word> <Word>min-width</Word> <Word>orphans</Word> <Word>outline</Word> <Word>outline-color</Word> <Word>outline-style</Word> <Word>outline-width</Word> <Word>overflow</Word> <Word>padding</Word> <Word>padding-top</Word> <Word>padding-right</Word> <Word>padding-bottom</Word> <Word>padding-left</Word> <Word>page</Word> <Word>page-break-after</Word> <Word>page-break-before</Word> <Word>page-break-inside</Word> <Word>panose-1</Word> <Word>pause</Word> <Word>pause-after</Word> <Word>pause-before</Word> <Word>pitch</Word> <Word>pitch-range</Word> <Word>play-during</Word> <Word>position</Word> <Word>quotes</Word> <Word>richness</Word> <Word>right</Word> <Word>size</Word> <Word>slope</Word> <Word>src</Word> <Word>speak</Word> <Word>speak-header</Word> <Word>speak-numeral</Word> <Word>speak-punctuation</Word> <Word>speech-rate</Word> <Word>stemh</Word> <Word>stemv</Word> <Word>stress</Word> <Word>table-layout</Word> <Word>text-align</Word> <Word>text-decoration</Word> <Word>text-indent</Word> <Word>text-shadow</Word> <Word>text-transform</Word> <Word>top</Word> <Word>unicode-bidi</Word> <Word>unicode-range</Word> <Word>units-per-em</Word> <Word>vertical-align</Word> <Word>visibility</Word> <Word>voice-family</Word> <Word>volume</Word> <Word>white-space</Word> <Word>widows</Word> <Word>width</Word> <Word>widths</Word> <Word>word-spacing</Word> <Word>x-height</Word> <Word>z-index</Word> </Keywords> <Keywords set="1"> <Word>above</Word> <Word>absolute</Word> <Word>ActiveBorder</Word> <Word>ActiveCaption</Word> <Word>all</Word> <Word>always</Word> <Word>AppWorkspace</Word> <Word>aqua</Word> <Word>armenian</Word> <Word>attr</Word> <Word>aural</Word> <Word>auto</Word> <Word>avoid</Word> <Word>Background</Word> <Word>baseline</Word> <Word>behind</Word> <Word>below</Word> <Word>bidi-override</Word> <Word>black</Word> <Word>blink</Word> <Word>block</Word> <Word>blue</Word> <Word>bold</Word> <Word>bolder</Word> <Word>both</Word> <Word>bottom</Word> <Word>braille</Word> <Word>ButtonFace</Word> <Word>ButtonHighlight</Word> <Word>ButtonShadow</Word> <Word>ButtonText</Word> <Word>capitalize</Word> <Word>caption</Word> <Word>CaptionText</Word> <Word>center</Word> <Word>center-left</Word> <Word>center-right</Word> <Word>circle</Word> <Word>cjk-ideographic</Word> <Word>close-quote</Word> <Word>code</Word> <Word>collapse</Word> <Word>compact</Word> <Word>condensed</Word> <Word>continuous</Word> <Word>counter</Word> <Word>counters</Word> <Word>crop</Word> <Word>cross</Word> <Word>crosshair</Word> <Word>cursive</Word> <Word>dashed</Word> <Word>decimal</Word> <Word>decimal-leading-zero</Word> <Word>default</Word> <Word>digits</Word> <Word>disc</Word> <Word>dotted</Word> <Word>double</Word> <Word>embed</Word> <Word>embossed</Word> <Word>e-resize</Word> <Word>expanded</Word> <Word>extra-condensed</Word> <Word>extra-expanded</Word> <Word>fantasy</Word> <Word>far-left</Word> <Word>far-right</Word> <Word>fast</Word> <Word>faster</Word> <Word>fixed</Word> <Word>format</Word> <Word>fuchsia</Word> <Word>georgian</Word> <Word>gray</Word> <Word>GrayText</Word> <Word>green</Word> <Word>groove</Word> <Word>handheld</Word> <Word>hebrew</Word> <Word>help</Word> <Word>hidden</Word> <Word>hide</Word> <Word>high</Word> <Word>higher</Word> <Word>Highlight</Word> <Word>HighlightText</Word> <Word>hiragana</Word> <Word>hiragana-iroha</Word> <Word>icon</Word> <Word>InactiveBorder</Word> <Word>InactiveCaption</Word> <Word>InactiveCaptionText</Word> <Word>InfoBackground</Word> <Word>InfoText</Word> <Word>inline</Word> <Word>inline-table</Word> <Word>inset</Word> <Word>inside</Word> <Word>invert</Word> <Word>italic</Word> <Word>justify</Word> <Word>katakana</Word> <Word>katakana-iroha</Word> <Word>landscape</Word> <Word>large</Word> <Word>larger</Word> <Word>left</Word> <Word>left-side</Word> <Word>leftwards</Word> <Word>level</Word> <Word>lighter</Word> <Word>lime</Word> <Word>line-through</Word> <Word>list-item</Word> <Word>local</Word> <Word>loud</Word> <Word>low</Word> <Word>lower</Word> <Word>lower-alpha</Word> <Word>lowercase</Word> <Word>lower-greek</Word> <Word>lower-latin</Word> <Word>lower-roman</Word> <Word>ltr</Word> <Word>marker</Word> <Word>maroon</Word> <Word>medium</Word> <Word>Menu</Word> <Word>MenuText</Word> <Word>message-box</Word> <Word>middle</Word> <Word>mix</Word> <Word>monospace</Word> <Word>move</Word> <Word>narrower</Word> <Word>navy</Word> <Word>ne-resize</Word> <Word>no-close-quote</Word> <Word>none</Word> <Word>no-open-quote</Word> <Word>no-repeat</Word> <Word>normal</Word> <Word>nowrap</Word> <Word>n-resize</Word> <Word>nw-resize</Word> <Word>oblique</Word> <Word>olive</Word> <Word>once</Word> <Word>open-quote</Word> <Word>outset</Word> <Word>outside</Word> <Word>overline</Word> <Word>pointer</Word> <Word>portrait</Word> <Word>pre</Word> <Word>print</Word> <Word>projection</Word> <Word>purple</Word> <Word>red</Word> <Word>relative</Word> <Word>repeat</Word> <Word>repeat-x</Word> <Word>repeat-y</Word> <Word>rgb</Word> <Word>ridge</Word> <Word>right</Word> <Word>right-side</Word> <Word>rightwards</Word> <Word>rtl</Word> <Word>run-in</Word> <Word>sans-serif</Word> <Word>screen</Word> <Word>scroll</Word> <Word>Scrollbar</Word> <Word>semi-condensed</Word> <Word>semi-expanded</Word> <Word>separate</Word> <Word>se-resize</Word> <Word>serif</Word> <Word>show</Word> <Word>silent</Word> <Word>silver</Word> <Word>slow</Word> <Word>slower</Word> <Word>small</Word> <Word>small-caps</Word> <Word>small-caption</Word> <Word>smaller</Word> <Word>soft</Word> <Word>solid</Word> <Word>speech</Word> <Word>spell-out</Word> <Word>square</Word> <Word>s-resize</Word> <Word>static</Word> <Word>status-bar</Word> <Word>sub</Word> <Word>super</Word> <Word>sw-resize</Word> <Word>table</Word> <Word>table-caption</Word> <Word>table-cell</Word> <Word>table-column</Word> <Word>table-column-group</Word> <Word>table-footer-group</Word> <Word>table-header-group</Word> <Word>table-row</Word> <Word>table-row-group</Word> <Word>teal</Word> <Word>text</Word> <Word>text-bottom</Word> <Word>text-top</Word> <Word>thick</Word> <Word>thin</Word> <Word>ThreeDDarkShadow</Word> <Word>ThreeDFace</Word> <Word>ThreeDHighlight</Word> <Word>ThreeDLightShadow</Word> <Word>ThreeDShadow</Word> <Word>top</Word> <Word>transparent</Word> <Word>tty</Word> <Word>tv</Word> <Word>ultra-condensed</Word> <Word>ultra-expanded</Word> <Word>underline</Word> <Word>upper-alpha</Word> <Word>uppercase</Word> <Word>upper-latin</Word> <Word>upper-roman</Word> <Word>url</Word> <Word>visible</Word> <Word>wait</Word> <Word>white</Word> <Word>wider</Word> <Word>Window</Word> <Word>WindowFrame</Word> <Word>WindowText</Word> <Word>w-resize</Word> <Word>x-fast</Word> <Word>x-high</Word> <Word>x-large</Word> <Word>x-loud</Word> <Word>x-low</Word> <Word>x-slow</Word> <Word>x-small</Word> <Word>x-soft</Word> <Word>xx-large</Word> <Word>xx-small</Word> <Word>yellow</Word> </Keywords> </Syntax> --- NEW FILE: html.syn --- <Syntax> <Lexer> <Name>SCLEX_HTML</Name> <Property name="fold.html">1</Property> <Property name="fold">1</Property> <Property name="fold.html.preprocessor">1</Property> <Property name="fold.compact">1</Property> <Property name="html.tags.case.sensitive">1</Property> <Property name="asp.default.language">0</Property> </Lexer> <View> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>8</TabWidth> <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> [...2654 lines suppressed...] <Word>umask</Word> <Word>uniqid</Word> <Word>unlink</Word> <Word>unpack</Word> <Word>unserialize</Word> <Word>unset</Word> <Word>urldecode</Word> <Word>urlencode</Word> <Word>usleep</Word> <Word>usort</Word> <Word>virtual</Word> </Keywords> <Keywords set="5"> <Word>ELEMENT</Word> <Word>DOCTYPE</Word> <Word>ATTLIST</Word> <Word>ENTITY</Word> <Word>NOTATION</Word> </Keywords> </Syntax> --- NEW FILE: pascal.syn --- <Syntax> <Lexer> <Name>SCLEX_PASCAL</Name> <Property name="fold.comment">1</Property> <Property name="fold.preprocessor">1</Property> <Property name="fold.compact">1</Property> </Lexer> <View> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <CodeHighlight> <SyntaxHighlighting>1</SyntaxHighlighting> <HighlightCurrentLine>1</HighlightCurrentLine> <BraceMatching>1</BraceMatching> </CodeHighlight> <AutoComp> <AutoCompletion>0</AutoCompletion> <CodeCompletion>0</CodeCompletion> <AutoCompKey>0</AutoCompKey> </AutoComp> <ClassView> <ClassViewOn>1</ClassViewOn> <SortClassView>1</SortClassView> <ParserDelay>1500</ParserDelay> </ClassView> <Indent> <Indent>1</Indent> <IndentSize>4</IndentSize> <AutoIndent>0</AutoIndent> <IndentGuides>1</IndentGuides> </Indent> <Margins> <LineNumbers>1</LineNumbers> <BookMark>1</BookMark> <Fold>1</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="0"> <Name>Whitespace</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="34"> <Name>Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="35"> <Name>Bad Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="1"> <Name>Comment Block</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="2"> <Name>Single Line Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="3"> <Name>Comment Doc</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F703F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="4"> <Name>Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="5"> <Name>Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="6"> <Name>Strings</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="7"> <Name>Characters</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>009300</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="8"> <Name>UUIDs</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>804080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="9"> <Name>Preprocessor Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F7F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="10"> <Name>Operators</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>4B0082</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="11"> <Name>Normal Text</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="12"> <Name>String EOL</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>E0C0E0</Background> </Color> </Style> <Style number="13"> <Name>Verbatim</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>E0FFE0</Background> </Color> </Style> <Style number="14"> <Name>Inline ASM</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F7F3F</Foreground> <Background>E0F0FF</Background> </Color> </Style> <Style number="15"> <Name>Comment Line Doc</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F703F</Foreground> <Background>E0F0FF</Background> </Color> </Style> <Style number="16"> <Name>Keywords 2</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>B00040</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="17"> <Name>Comment Doc Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3060A0</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="18"> <Name>Comment Doc Keywords Error</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>804020</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="19"> <Name>Global Class</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Keywords set="0"> <Word>alias</Word> <Word>and</Word> <Word>array</Word> <Word>as</Word> <Word>asm</Word> <Word>assembler</Word> <Word>begin</Word> <Word>break</Word> <Word>case</Word> <Word>cdecl</Word> <Word>class</Word> <Word>const</Word> <Word>constructor</Word> <Word>continue</Word> <Word>destructor</Word> <Word>dispose</Word> <Word>div</Word> <Word>do</Word> <Word>downto</Word> <Word>else</Word> <Word>end</Word> <Word>except</Word> <Word>exit</Word> <Word>exports</Word> <Word>external</Word> <Word>false</Word> <Word>far</Word> <Word>file</Word> <Word>finalization</Word> <Word>finally</Word> <Word>for</Word> <Word>forward</Word> <Word>function</Word> <Word>goto</Word> <Word>if</Word> <Word>implementation</Word> <Word>in</Word> <Word>index</Word> <Word>initialization</Word> <Word>inherited</Word> <Word>inline</Word> <Word>interface</Word> <Word>is</Word> <Word>label</Word> <Word>library</Word> <Word>mod</Word> <Word>name</Word> <Word>near</Word> <Word>new</Word> <Word>nil</Word> <Word>not</Word> <Word>object</Word> <Word>of</Word> <Word>on</Word> <Word>operator</Word> <Word>or</Word> <Word>packed</Word> <Word>pascal</Word> <Word>popstack</Word> <Word>procedure</Word> <Word>program</Word> <Word>raise</Word> <Word>record</Word> <Word>repeat</Word> <Word>self</Word> <Word>set</Word> <Word>shl</Word> <Word>shr</Word> <Word>stdcall</Word> <Word>string</Word> <Word>then</Word> <Word>to</Word> <Word>true</Word> <Word>try</Word> <Word>type</Word> <Word>unit</Word> <Word>until</Word> <Word>uses</Word> <Word>var</Word> <Word>while</Word> <Word>with</Word> <Word>xor</Word> </Keywords> <Keywords set="1"> <Word>absolute</Word> <Word>abstract</Word> <Word>default</Word> <Word>export</Word> <Word>override</Word> <Word>private</Word> <Word>property</Word> <Word>protected</Word> <Word>public</Word> <Word>published</Word> <Word>read</Word> <Word>register</Word> <Word>saveregisters</Word> <Word>virtual</Word> <Word>write</Word> </Keywords> </Syntax> --- NEW FILE: xml.syn --- <Syntax> <Lexer> <Name>SCLEX_XML</Name> <Property name="fold">1</Property> <Property name="fold.compact">1</Property> </Lexer> <View> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <CodeHighlight> <SyntaxHighlighting>1</SyntaxHighlighting> <HighlightCurrentLine>1</HighlightCurrentLine> <BraceMatching>1</BraceMatching> </CodeHighlight> <AutoComp> <AutoCompletion>0</AutoCompletion> <CodeCompletion>0</CodeCompletion> <AutoCompKey>0</AutoCompKey> </AutoComp> <ClassView> <ClassViewOn>1</ClassViewOn> <SortClassView>1</SortClassView> <ParserDelay>1500</ParserDelay> </ClassView> <Indent> <Indent>1</Indent> <IndentSize>4</IndentSize> <AutoIndent>0</AutoIndent> <IndentGuides>1</IndentGuides> </Indent> <Margins> <LineNumbers>1</LineNumbers> <BookMark>1</BookMark> <Fold>1</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="0"> <Name>Whitespace</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="34"> <Name>Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="35"> <Name>Bad Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="1"> <Name>Tags</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="2"> <Name>Unknown Tags</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="3"> <Name>Attributes</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>808000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="4"> <Name>Unknown Attributes</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>808000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="5"> <Name>Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="6"> <Name>Double Quoted Strings</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="7"> <Name>Single Quoted Strings</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="8"> <Name>Inside Tags</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>800080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="9"> <Name>Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>808000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="10"> <Name>Entity</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="11"> <Name>End Tag</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="12"> <Name>XML Start</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="13"> <Name>XML End</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="14"> <Name>Javascript</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F8F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="15"> <Name>ASP</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F703F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="16"> <Name>ASP at</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F703F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="17"> <Name>CDATA</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="18"> <Name>Question</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="19"> <Name>Value</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF00FF</Foreground> <Background>FFEFFF</Background> </Color> </Style> <Style number="20"> <Name>XC Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F7F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="21"> <Name>SGML Tags</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000080</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="22"> <Name>SGML Command</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000080</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="23"> <Name>SGML 1st Param</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000080</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="24"> <Name>SGML Double Quoted String</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>800000</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="25"> <Name>SGML Single Quoted String</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>993300</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="26"> <Name>SGML Error</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>800000</Foreground> <Background>FF6666</Background> </Color> </Style> <Style number="27"> <Name>SGML Special Type</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3366FF</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="28"> <Name>SGML Entity</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>333333</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="29"> <Name>SGML Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>808000</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="30"> <Name>SGML 1st Param Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>808000</Foreground> <Background>EFEFFF</Background> </Color> </Style> <Style number="31"> <Name>SGML Block</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000066</Foreground> <Background>CCCCE0</Background> </Color> </Style> </Syntax> |
From: <moo...@us...> - 2004-03-15 09:09:57
|
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17779 Modified Files: AnyEdit.exe Log Message: Default Config and Language update - Changed Layout of the Default config - Added Syntax Files for CSS, HTML, XML and Pascal - New executable to handle the new config file. Index: AnyEdit.exe =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/AnyEdit.exe,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 Binary files /tmp/cvsm6fgrB and /tmp/cvsyZk8TL differ |
From: <moo...@us...> - 2004-03-15 09:09:57
|
Update of /cvsroot/anyedit/AnyEditBin/Config/Default In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17779/Config/Default Modified Files: AnyEdit.cfg Log Message: Default Config and Language update - Changed Layout of the Default config - Added Syntax Files for CSS, HTML, XML and Pascal - New executable to handle the new config file. Index: AnyEdit.cfg =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/AnyEdit.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AnyEdit.cfg 12 Dec 2003 14:54:12 -0000 1.2 --- AnyEdit.cfg 15 Mar 2004 09:00:48 -0000 1.3 *************** *** 1,4 **** <Config> ! <Languages>7</Languages> <Language number="0"> <Name>Default</Name> --- 1,4 ---- <Config> ! <Languages count="11"> <Language number="0"> <Name>Default</Name> *************** *** 37,39 **** --- 37,59 ---- <Extensions>js</Extensions> </Language> + <Language number="7"> + <Name>HTML</Name> + <SyntaxFile>html.syn</SyntaxFile> + <Extensions>html,htm,php,asp,php3,shtml,phtml</Extensions> + </Language> + <Language number="8"> + <Name>CSS</Name> + <SyntaxFile>css.syn</SyntaxFile> + <Extensions>css</Extensions> + </Language> + <Language number="9"> + <Name>XML</Name> + <SyntaxFile>xml.syn</SyntaxFile> + <Extensions>xml,xsl,svg,xul,xsd,dtd,xslt</Extensions> + </Language> + <Language number="10"> + <Name>Pascal</Name> + <SyntaxFile>pascal.syn</SyntaxFile> + <Extensions>pas,dpr,dpk,dfm,inc,pp</Extensions> + </Languages> </Config> |
From: <moo...@us...> - 2004-03-15 09:01:02
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16815 Modified Files: AnyEdit.rc CodingPref.cpp ColorPref.cpp ConfigFile.cpp ConfigFile.h EditorPref.cpp FontPref.cpp LangPref.cpp LangPref.h SAPrefsDialog.cpp SAPrefsSubDlg.cpp SAPrefsSubDlg.h SyntaxFile.h resource.h Log Message: Preferences Update - Language Add/Change/Removal added. - ConfigFile, added extra get and set functions and add remove language. - SyntaxFile.h, inherited from CObject - SAPrefsSubDlg, changed SetSyntaxFile to SetDataFile, so it can handle both ConfigFiles and SyntaxFiles - *Pref.cpp, changes for the previous update. - LangPref, completly redesigned. Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** AnyEdit.rc 26 Feb 2004 08:44:16 -0000 1.33 --- AnyEdit.rc 15 Mar 2004 08:51:53 -0000 1.34 *************** *** 1486,1502 **** FONT 8, "MS Sans Serif" BEGIN ! LTEXT "File Types",IDC_FILE_LIST,7,8,137,71 ! PUSHBUTTON "&Add",IDC_BUTTON1,169,9,73,15 ! PUSHBUTTON "&Remove",IDC_BUTTON2,169,33,74,14 ! LTEXT "Description",IDC_STATIC,7,93,42,11 ! LTEXT "File Extension",IDC_STATIC,7,109,52,9 ! EDITTEXT IDC_EDIT1,67,90,180,12,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT2,67,106,180,12,ES_AUTOHSCROLL ! LTEXT "&Syntax File",IDC_STATIC,7,130,39,9 ! LTEXT "Auto &Completion",IDC_STATIC,8,148,56,8 ! COMBOBOX IDC_COMBO1,67,126,180,59,CBS_DROPDOWNLIST | CBS_SORT | ! WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_COMBO2,68,144,179,41,CBS_DROPDOWNLIST | CBS_SORT | ! WS_VSCROLL | WS_TABSTOP END --- 1486,1504 ---- FONT 8, "MS Sans Serif" BEGIN ! PUSHBUTTON "&Add",IDC_BUTTON_ADD,107,92,50,16 ! PUSHBUTTON "&Remove",IDC_BUTTON_REMOVE,233,92,50,16 ! LTEXT "Name",IDC_STATIC,107,7,42,11 ! LTEXT "Extensions",IDC_STATIC,109,26,52,9 ! EDITTEXT IDC_EDIT_NAME,167,7,116,12,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT_EXTENSIONS,167,26,116,12,ES_AUTOHSCROLL ! LTEXT "Syntax File",IDC_STATIC,107,45,39,9 ! LTEXT "Auto Completion",IDC_STATIC,107,65,56,8 ! COMBOBOX IDC_COMBO_SYNTAXFILE,167,45,116,59,CBS_DROPDOWNLIST | ! CBS_SORT | WS_VSCROLL | WS_TABSTOP ! COMBOBOX IDC_COMBO_AUTOCOMPFILE,167,65,116,41,CBS_DROPDOWNLIST | ! CBS_SORT | WS_VSCROLL | WS_TABSTOP ! LISTBOX IDC_LIST_LANGUAGES,7,7,90,109,LBS_SORT | ! LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP ! PUSHBUTTON "&Change",IDC_BUTTON_CHANGE,170,92,50,16 END *************** *** 2593,2596 **** --- 2595,2644 ---- ///////////////////////////////////////////////////////////////////////////// + // Dutch (Netherlands) resources + + #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NLD) + #ifdef _WIN32 + LANGUAGE LANG_DUTCH, SUBLANG_DUTCH + #pragma code_page(1252) + #endif //_WIN32 + + ///////////////////////////////////////////////////////////////////////////// + // + // Dialog + // + + IDD_DIALOG3 DIALOG DISCARDABLE 0, 0, 186, 94 + STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU + CAPTION "Dialog" + FONT 8, "MS Sans Serif" + BEGIN + DEFPUSHBUTTON "OK",IDOK,129,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14 + END + + + ///////////////////////////////////////////////////////////////////////////// + // + // DESIGNINFO + // + + #ifdef APSTUDIO_INVOKED + GUIDELINES DESIGNINFO DISCARDABLE + BEGIN + IDD_DIALOG3, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 179 + TOPMARGIN, 7 + BOTTOMMARGIN, 87 + END + END + #endif // APSTUDIO_INVOKED + + #endif // Dutch (Netherlands) resources + ///////////////////////////////////////////////////////////////////////////// + + + ///////////////////////////////////////////////////////////////////////////// // English (U.K.) resources Index: CodingPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/CodingPref.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CodingPref.cpp 26 Feb 2004 18:00:32 -0000 1.7 --- CodingPref.cpp 15 Mar 2004 08:51:53 -0000 1.8 *************** *** 95,98 **** --- 95,99 ---- { CString szParserDelay; + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; CSAPrefsSubDlg::OnInitDialog(); *************** *** 123,126 **** --- 124,129 ---- BOOL CCodingPref::SaveChanges() { + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; + // If the dialog hasn't been visible the handle is not valid. // But if it wasn't visible nothing has changed. Index: ColorPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ColorPref.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ColorPref.cpp 21 Feb 2004 12:14:05 -0000 1.6 --- ColorPref.cpp 15 Mar 2004 08:51:53 -0000 1.7 *************** *** 86,89 **** --- 86,91 ---- int iCount; int iColor; + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; + CSAPrefsSubDlg::OnInitDialog(); *************** *** 202,205 **** --- 204,208 ---- CString szFileName; CSyntaxFile* pSyntaxFile; + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; pSyntaxFile = NULL; *************** *** 267,270 **** --- 270,274 ---- POSITION pos; + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; pos = m_ForegroundColors.GetStartPosition(); for( iCount = 0; iCount < m_ForegroundColors.GetCount(); ++ iCount ) Index: ConfigFile.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ConfigFile.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConfigFile.cpp 12 Dec 2003 11:00:04 -0000 1.1 --- ConfigFile.cpp 15 Mar 2004 08:51:53 -0000 1.2 *************** *** 6,9 **** --- 6,11 ---- //#include "anyedit.h" #include "ConfigFile.h" + #include <iostream> + #include <fstream> #ifdef _DEBUG *************** *** 46,67 **** BOOL CConfigFile::Save() { return TRUE; } ! // Get the number of languages ! int CConfigFile::GetLanguageCount() { xml_node xnode; xnode = xparser.document(); ! if( xnode.empty() && !xnode.children() ) return -1; ! xnode = xnode.child(0); ! if( xnode.empty() && !xnode.children() ) return -1; ! xnode = xnode.first_element_by_name( TAG_LANGUAGES ); ! if( xnode.empty() && !xnode.children() ) return -1; ! return atoi( xnode.child(0).value() ); } --- 48,104 ---- BOOL CConfigFile::Save() { + filebuf fb; + xml_node xnode; + fb.open( szFileName, ios::out ); + ostream os(&fb); + xnode = xparser.document(); + if( xnode.empty() ) return FALSE; + xnode.outer_xml( os ); + fb.close(); return TRUE; } ! // Get the languages tag ! xml_node CConfigFile::GetLanguagesNode() { xml_node xnode; xnode = xparser.document(); ! if( !xnode.empty() ) ! { ! xnode = xnode.child(0); ! if( !xnode.empty() ) ! { ! xnode = xnode.first_element_by_name( TAG_LANGUAGES ); ! } ! } ! return xnode; ! } ! xml_node CConfigFile::GetLanguageNodeByNumber( int iNumber ) ! { ! char szNumber[4]; ! xml_node xnode; ! xnode = GetLanguagesNode(); ! if( xnode.empty() ) return FALSE; ! sprintf( szNumber, "%i", iNumber ); ! return xnode.first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); ! } ! ! // Get the number of languages ! int CConfigFile::GetLanguageCount() ! { ! xml_node xnode; ! xml_attribute xattribute; ! ! xnode = GetLanguagesNode(); ! if( !xnode.empty() && !xnode.children() ) return -1; ! ! xattribute = xnode.attribute( ATT_LANGUAGES_COUNT ); ! if( xattribute.empty() ) return -1; ! ! return atoi( xattribute.value() ); } *************** *** 72,77 **** xml_node xnode; sprintf( szNumber, "%i", iNumber ); ! xnode = xparser.document().first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); if( xnode.empty() && !xnode.children() ) return ""; --- 109,117 ---- xml_node xnode; + xnode = GetLanguagesNode(); + if( xnode.empty() && !xnode.children() ) return -1; + sprintf( szNumber, "%i", iNumber ); ! xnode = xnode.first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); if( xnode.empty() && !xnode.children() ) return ""; *************** *** 82,85 **** --- 122,139 ---- } + // Set the name of the language with number iNumber to szName. + BOOL CConfigFile::SetLanguageName( int iNumber, CString szName ) + { + xml_node xnode; + + xnode = GetLanguageNodeByNumber( iNumber ); + if( xnode.empty() || !xnode.children() ) return FALSE; + + xnode = xnode.first_element_by_name( TAG_LANGUAGE_NAME ); + if( xnode.empty() || !xnode.children() ) return FALSE; + + return xnode.child(0).value( szName ); + } + // Get the syntaxfile name of the language with number iNumber. CString CConfigFile::GetLanguageSyntaxFileName( int iNumber ) *************** *** 88,93 **** xml_node xnode; sprintf( szNumber, "%i", iNumber ); ! xnode = xparser.document().first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); if( xnode.empty() && !xnode.children() ) return ""; --- 142,149 ---- xml_node xnode; + xnode = GetLanguagesNode(); + sprintf( szNumber, "%i", iNumber ); ! xnode = xnode.first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); if( xnode.empty() && !xnode.children() ) return ""; *************** *** 98,101 **** --- 154,186 ---- } + // Set the syntaxfile name of the language with number iNumber to szSyntaxFileName. + BOOL CConfigFile::SetLanguageSyntaxFileName( int iNumber, CString szSyntaxFileName ) + { + xml_node xroot; + xml_node xnode; + + xroot = GetLanguageNodeByNumber( iNumber ); + if( xroot.empty() || !xroot.children() ) return FALSE; + + xnode = xroot.first_element_by_name( TAG_LANGUAGE_SYNTAXFILE ); + if( xnode.empty() ) + { + xnode = xroot.append_child( node_element ); + if( !xnode.name( TAG_LANGUAGE_SYNTAXFILE ) ) return FALSE; + } + + if( !xnode.children() ) + { + xnode = xnode.append_child( node_pcdata ); + if( xnode.empty() ) return FALSE; + } + else + { + xnode = xnode.child(0); + } + + return xnode.value( szSyntaxFileName ); + } + // Get the auto completion filename of the language with number iNumber. CString CConfigFile::GetLanguageAutoCompFileName( int iNumber ) *************** *** 104,109 **** xml_node xnode; sprintf( szNumber, "%i", iNumber ); ! xnode = xparser.document().first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); if( xnode.empty() && !xnode.children() ) return ""; --- 189,196 ---- xml_node xnode; + xnode = GetLanguagesNode(); + sprintf( szNumber, "%i", iNumber ); ! xnode = xnode.first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); if( xnode.empty() && !xnode.children() ) return ""; *************** *** 114,117 **** --- 201,235 ---- } + // Set the auto completion filename of the language with number iNumber to szAutoCompFile. + BOOL CConfigFile::SetLanguageAutoCompFileName( int iNumber, CString szAutoCompFileName ) + { + xml_node xroot; + xml_node xnode; + + xroot = GetLanguageNodeByNumber( iNumber ); + if( xroot.empty() || !xroot.children() ) return FALSE; + + xnode = xroot.first_element_by_name( TAG_LANGUAGE_AUTOCOMPFILE ); + if( xnode.empty() ) + { + xnode = xroot.append_child( node_element ); + if( !xnode.name( TAG_LANGUAGE_SYNTAXFILE ) ) return FALSE; + } + + + if( !xnode.children() ) + { + xnode = xnode.append_child( node_pcdata ); + if( xnode.empty() ) return FALSE; + } + else + { + xnode = xnode.child(0); + } + + return xnode.value( szAutoCompFileName ); + } + + // Get the extensions string of languge with number iNumber. CString CConfigFile::GetLanguageExtensions( int iNumber ) *************** *** 120,125 **** xml_node xnode; sprintf( szNumber, "%i", iNumber ); ! xnode = xparser.document().first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); if( xnode.empty() && !xnode.children() ) return ""; --- 238,245 ---- xml_node xnode; + xnode = GetLanguagesNode(); + sprintf( szNumber, "%i", iNumber ); ! xnode = xnode.first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); if( xnode.empty() && !xnode.children() ) return ""; *************** *** 129,130 **** --- 249,384 ---- return xnode.child(0).value(); } + + // Set the extensions string of language with numbet iNumber to szExtensions. + BOOL CConfigFile::SetLanguageExtensions( int iNumber, CString szExtensions ) + { + xml_node xnode; + + xnode = GetLanguageNodeByNumber( iNumber ); + if( xnode.empty() || !xnode.children() ) return FALSE; + + xnode = xnode.first_element_by_name( TAG_LANGUAGE_EXTENSIONS ); + if( xnode.empty() || !xnode.children() ) return FALSE; + + return xnode.child(0).value( szExtensions ); + } + + + // Add a language to the config file. + BOOL CConfigFile::AddLanguage( CString szName, CString szSyntaxFile, CString szAutoCompFile, CString szExtensions ) + { + unsigned int uiCount; + char szNumber[4]; + xml_node xroot; + xml_node xnode; + xml_attribute xattribute; + + // A language does at least need a name. + if( szName.IsEmpty() ) return FALSE; + + xroot = GetLanguagesNode(); + if( xroot.empty() ) return FALSE; + + uiCount = xroot.children(); + sprintf( szNumber, "%i", uiCount + 1 ); + + xattribute = xroot.attribute( (unsigned int)0 ); + if( xroot.empty() ) return FALSE; + + if( !xattribute.value( szNumber ) ) return FALSE; + + // Add a new language tag + xroot = xroot.append_child( node_element ); + if( xroot.empty() ) return FALSE; + + if( !xroot.name( TAG_LANGUAGE ) ) return FALSE; + + // Set the language number + xattribute = xroot.append_attribute( ATT_LANGUAGE_NUMBER, (long)uiCount ); + if( xattribute.empty() ) return FALSE; + + // Add the language name + xnode = xroot.append_child( node_element ); + if( xnode.empty() ) return FALSE; + + if( !xnode.name( TAG_LANGUAGE_NAME ) ) return FALSE; + + xnode = xnode.append_child( node_pcdata ); + if( xnode.empty() ) return FALSE; + + if( !xnode.value( szName ) ) return FALSE; + + // Add the language syntax file filename + if( !szSyntaxFile.IsEmpty() ) + { + xnode = xroot.append_child( node_element ); + if( xnode.empty() ) return FALSE; + + if( !xnode.name( TAG_LANGUAGE_SYNTAXFILE ) ) return FALSE; + + xnode = xnode.append_child( node_pcdata ); + if( xnode.empty() ) return FALSE; + + if( !xnode.value( szSyntaxFile ) ) return FALSE; + } + + // Add the language auto completion file filename + if( !szAutoCompFile.IsEmpty() ) + { + xnode = xroot.append_child( node_element ); + if( xnode.empty() ) return FALSE; + + if( !xnode.name( TAG_LANGUAGE_AUTOCOMPFILE ) ) return FALSE; + + xnode = xnode.append_child( node_pcdata ); + if( xnode.empty() ) return FALSE; + + if( !xnode.value( szAutoCompFile ) ) return FALSE; + } + + // Add the language extensions + if( szExtensions.IsEmpty() ) return FALSE; + + xnode = xroot.append_child( node_element ); + if( xnode.empty() ) return FALSE; + + if( !xnode.name( TAG_LANGUAGE_EXTENSIONS ) ) return FALSE; + + xnode = xnode.append_child( node_pcdata ); + if( xnode.empty() ) return FALSE; + + if( !xnode.value( szName ) ) return FALSE; + + return TRUE; + } + + // Remove a language out of the config file. + BOOL CConfigFile::RemoveLanguage( int iNumber ) + { + unsigned int uiCount; + char szNumber[4]; + xml_node xnode; + xml_node rnode; + xml_attribute xattribute; + + xnode = GetLanguagesNode(); + + sprintf( szNumber, "%i", iNumber ); + rnode = xnode.first_element_by_attribute( TAG_LANGUAGE, ATT_LANGUAGE_NUMBER, szNumber ); + if( rnode.empty() && !rnode.children() ) return FALSE; + + uiCount = xnode.children(); + if( uiCount < iNumber ) return FALSE; + + xnode.remove_child( iNumber ); + while( iNumber < uiCount - 1 ) + { + sprintf( szNumber, "%i", iNumber ); + rnode = xnode.child( iNumber ); + xattribute = rnode.attribute( (unsigned int)0 ); + xattribute.value( szNumber ); + ++ iNumber; + } + + return TRUE; + } Index: ConfigFile.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ConfigFile.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConfigFile.h 12 Dec 2003 11:00:04 -0000 1.1 --- ConfigFile.h 15 Mar 2004 08:51:53 -0000 1.2 *************** *** 22,25 **** --- 22,28 ---- #define TAG_LANGUAGE "Language" + // Languages attributes + #define ATT_LANGUAGES_COUNT "count" + // Language tags #define TAG_LANGUAGE_NAME "Name" *************** *** 39,43 **** #define ANYEDIT_CONFIG_FILE "AnyEdit.cfg" ! class CConfigFile { protected: --- 42,46 ---- #define ANYEDIT_CONFIG_FILE "AnyEdit.cfg" ! class CConfigFile : public CObject { protected: *************** *** 45,48 **** --- 48,57 ---- xml_parser xparser; + // Get the node for the languages tag. + xml_node GetLanguagesNode(); + + // Get the node of the language with number. + xml_node GetLanguageNodeByNumber( int iNumber ); + public: CConfigFile(); *************** *** 64,75 **** CString GetLanguageName( int iNumber ); // Get the syntaxfile name of the language with number iNumber. CString GetLanguageSyntaxFileName( int iNumber ); // Get the auto completion filename of the language with number iNumber. CString GetLanguageAutoCompFileName( int iNumber ); ! // Get the extensions string of languge with number iNumber. CString GetLanguageExtensions( int iNumber ); }; --- 73,102 ---- CString GetLanguageName( int iNumber ); + // Set the name of the language with number iNumber to szName. + BOOL SetLanguageName( int iNumber, CString szName ); + // Get the syntaxfile name of the language with number iNumber. CString GetLanguageSyntaxFileName( int iNumber ); + // Set the syntaxfile name of the language with number iNumber to szSyntaxFileName. + BOOL SetLanguageSyntaxFileName( int iNumber, CString szSyntaxFileName ); + // Get the auto completion filename of the language with number iNumber. CString GetLanguageAutoCompFileName( int iNumber ); ! // Set the auto completion filename of the language with number iNumber to szAutoCompFile. ! BOOL SetLanguageAutoCompFileName( int iNumber, CString szAutoCompFileName ); ! ! // Get the extensions string of language with number iNumber. CString GetLanguageExtensions( int iNumber ); + + // Set the extensions string of language with numbet iNumber to szExtensions. + BOOL SetLanguageExtensions( int iNumber, CString szExtensions ); + + // Add a language to the config file. + BOOL AddLanguage( CString szName, CString szSyntaxFile, CString szAutoCompFile, CString szExtensions ); + + // Remove a language with number iNumber from the Languages tag. + BOOL RemoveLanguage( int iNumber ); }; Index: EditorPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/EditorPref.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EditorPref.cpp 21 Feb 2004 12:14:05 -0000 1.7 --- EditorPref.cpp 15 Mar 2004 08:51:53 -0000 1.8 *************** *** 99,102 **** --- 99,106 ---- { CSAPrefsSubDlg::OnInitDialog(); + + // Cast the pointer. + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; + m_bMarginLineNumbers = m_pSyntaxFile->GetMarginLineNumber(); m_bMarginBookmark = m_pSyntaxFile->GetMarginBookmark(); *************** *** 126,129 **** --- 130,136 ---- if( !m_hWnd ) return false; + // Cast the pointer. + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; + UpdateData(); if( m_bMarginLineNumbers != m_pSyntaxFile->GetMarginLineNumber() ) Index: FontPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FontPref.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FontPref.cpp 21 Feb 2004 12:14:05 -0000 1.6 --- FontPref.cpp 15 Mar 2004 08:51:53 -0000 1.7 *************** *** 103,106 **** --- 103,108 ---- int iCount; CString szTemp; + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; + CSAPrefsSubDlg::OnInitDialog(); *************** *** 402,405 **** --- 404,410 ---- POSITION pos; + // Cast the pointer. + CSyntaxFile* m_pSyntaxFile = (CSyntaxFile*)m_pDataFile; + // First get the current set font pos = mapFontName.GetStartPosition(); Index: LangPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/LangPref.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LangPref.cpp 17 Jul 2003 11:32:15 -0000 1.4 --- LangPref.cpp 15 Mar 2004 08:51:53 -0000 1.5 *************** *** 30,34 **** #include "anyedit.h" #include "LangPref.h" - #include "InputBox.h" #ifdef _DEBUG --- 30,33 ---- *************** *** 43,47 **** CLangPref::CLangPref(CWnd* pParent /*=NULL*/) ! : CSAPrefsSubDlg(CLangPref::IDD, pParent),m_langList(this) { //{{AFX_DATA_INIT(CLangPref) --- 42,46 ---- CLangPref::CLangPref(CWnd* pParent /*=NULL*/) ! : CSAPrefsSubDlg(CLangPref::IDD, pParent)/*,m_langList(this)*/ { //{{AFX_DATA_INIT(CLangPref) *************** *** 55,64 **** CSAPrefsSubDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CLangPref) ! DDX_Control(pDX, IDC_COMBO2, m_autocompfile); ! DDX_Control(pDX, IDC_COMBO1, m_syntaxfile); ! DDX_Control(pDX, IDC_EDIT2, m_extension); ! DDX_Control(pDX, IDC_EDIT1, m_description); ! DDX_Control(pDX, IDC_FILE_LIST, m_langList); ! //}}AFX_DATA_MAP } --- 54,63 ---- CSAPrefsSubDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CLangPref) ! DDX_Control(pDX, IDC_LIST_LANGUAGES, m_lbLanguageList); ! DDX_Control(pDX, IDC_EDIT_NAME, m_ebLangName); ! DDX_Control(pDX, IDC_EDIT_EXTENSIONS, m_ebExtensions); ! DDX_Control(pDX, IDC_COMBO_SYNTAXFILE, m_cbSyntaxFile); ! DDX_Control(pDX, IDC_COMBO_AUTOCOMPFILE, m_cbAutoCompFile); ! //}}AFX_DATA_MAP } *************** *** 66,76 **** BEGIN_MESSAGE_MAP(CLangPref, CSAPrefsSubDlg) //{{AFX_MSG_MAP(CLangPref) ! ON_BN_CLICKED(IDC_BUTTON1, OnAddNewLang) ! ON_BN_CLICKED(IDC_BUTTON2, OnRemoveLang) ! ON_WM_DESTROY() ! ON_EN_CHANGE(IDC_EDIT2, OnChangeExtension) ! ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangesynfile) ! ON_CBN_SELCHANGE(IDC_COMBO2, OnSelchangeCombo2) ! //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 65,73 ---- BEGIN_MESSAGE_MAP(CLangPref, CSAPrefsSubDlg) //{{AFX_MSG_MAP(CLangPref) ! ON_BN_CLICKED(IDC_BUTTON_ADD, OnButtonAdd) ! ON_BN_CLICKED(IDC_BUTTON_REMOVE, OnButtonRemove) ! ON_BN_CLICKED(IDC_BUTTON_CHANGE, OnButtonChange) ! ON_LBN_SELCHANGE(IDC_LIST_LANGUAGES, OnSelectListLanguages) ! //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 80,258 **** BOOL CLangPref::OnInitDialog() { ! CSAPrefsSubDlg::OnInitDialog(); ! m_langList.SetStandardButtons(BGCEDITLISTBOX_BTN_DELETE | BGCEDITLISTBOX_BTN_UP | BGCEDITLISTBOX_BTN_DOWN); ! ! LoadLangToList(); ! m_langList.OnSelectionChanged(); ! return TRUE; // return TRUE unless you set the focus to a control ! // EXCEPTION: OCX Property Pages should return FALSE ! } ! void CLangList::OnSelectionChanged() ! { ! //variables ! CString Sep = _T("\\"); ! CString selLang = GetItemText(GetSelItem()); ! CString regRootVal = SEC_LANG+Sep+selLang; ! TCHAR descr[1024]; ! m_pParent->m_description.SetWindowText(selLang); ! m_pParent->m_extension.SetWindowText(m_pParent->m_reg.GetProfileString(regRootVal,"Extension", descr,_T(""))); ! m_pParent->m_syntaxfile.SelectString(0,m_pParent->m_reg.GetProfileString(regRootVal,"SyntaxFile", descr,_T(""))); ! CString selacmpfile = m_pParent->m_reg.GetProfileString(regRootVal,"ACPFile", descr,_T("")); ! if(selacmpfile.IsEmpty()) ! { ! m_pParent->m_autocompfile.SetCurSel(-1); //.SelectString(0,_T(" ")); ! } ! else ! m_pParent->m_autocompfile.SelectString(0,selacmpfile); ! } ! void CLangPref::SaveDataForCurrentItem(int i) ! { ! int sfile,afile; ! //if(i==0) return; ! CString descriptionStr; ! CString extensionStr; ! CString synfileStr; ! CString acpfileStr; ! CString Sep=_T("\\"); ! //retrivevalues ! m_description.GetWindowText(descriptionStr); ! m_extension.GetWindowText(extensionStr); ! sfile = m_syntaxfile.GetCurSel(); ! if(!(sfile<0)) ! m_syntaxfile.GetLBText(sfile,synfileStr); ! afile = m_autocompfile.GetCurSel(); ! if(!(afile<0)) ! m_autocompfile.GetLBText(afile,acpfileStr); ! acpfileStr.TrimLeft(); ! CString regRootVal= SEC_LANG + Sep + descriptionStr; ! switch(i) ! { ! case 0: ! m_reg.WriteProfileString( regRootVal,"Extension",extensionStr); ! break; ! case 1: ! m_reg.WriteProfileString(regRootVal,"SyntaxFile",synfileStr); ! break; ! case 2: ! m_reg.WriteProfileString(regRootVal,"ACPFile",acpfileStr); ! break; ! } } ! BOOL CLangList::OnBeforeRemoveItem(int iItem) { ! if(MessageBox(_T("You are about to remove a Language File Type ! Are You Sure ?"),_T("AE - FileType Removal"),MB_YESNO)==6) ! return TRUE; ! else ! return FALSE; ! } ! void CLangList::ClearAll() ! { ! int x=GetCount(); ! for(int i=1;i<=x;i++) ! { ! RemoveItem(0); ! } ! } ! void CLangPref::OnAddNewLang() ! { ! CInputBox inpBox(_T("Enter name of new Language"),_T("The name of the language must be same as your syntax file caption")); ! if(inpBox.DoModal()==IDOK) { ! CString outStr = inpBox.GetOutput(); ! if(outStr.IsEmpty()) ! return; ! int langCnt = m_reg.GetProfileInt(SEC_LANG,_T("Count"),0)+1; ! m_reg.WriteProfileInt(SEC_LANG,_T("Count"),langCnt); ! m_reg.WriteProfileString( SEC_LANG,msc.GetStringForInt(langCnt),outStr); ! m_langList.AddItem(outStr); ! } } ! void CLangPref::OnRemoveLang() { ! if(m_langList.OnBeforeRemoveItem(m_langList.GetSelItem())) ! m_langList.RemoveItem(m_langList.GetSelItem()); ! } ! //Rewrites list to registry.. ! void CLangPref::RewriteLanguages() ! { ! int assCnt = m_langList.GetCount(); ! CString tempAss; ! m_reg.WriteProfileInt(SEC_LANG,_T("Count"),assCnt); ! for(int i=1;i<=assCnt;i++) ! { ! tempAss = m_langList.GetItemText(i-1); ! m_reg.WriteProfileString(SEC_LANG,msc.GetStringForInt(i),tempAss); ! } } ! void CLangPref::LoadLangToList() { ! int x = m_reg.GetProfileInt(SEC_LANG,_T("Count"),0); ! TCHAR tempStr[1024]; ! for(int i=1;i<=x;i++) ! { ! m_langList.AddItem(m_reg.GetProfileString(SEC_LANG,msc.GetStringForInt(i),tempStr,"")); ! } ! CString langDir = theApp.GetAppPath(); ! theApp.SetAppPath(langDir); ! langDir+= _T("Syntax"); ! langDir=msc.ChangeFormatToFilePath(langDir); ! CStringArray synArr; ! msc.GetFilesInFolder(langDir,_T("*.syn"),synArr); ! for(int y=0;y<synArr.GetSize();y++) ! { ! m_syntaxfile.AddString(synArr.GetAt(y)); ! } ! synArr.RemoveAll(); ! msc.GetFilesInFolder(langDir,_T("*.acmp"),synArr); ! //m_autocompfile.AddString(" "); ! for(y=0;y<synArr.GetSize();y++) ! { ! m_autocompfile.AddString(synArr.GetAt(y)); ! } } ! ! void CLangPref::OnDestroy() { ! CSAPrefsSubDlg::OnDestroy(); ! RewriteLanguages(); ! } ! void CLangPref::OnChangeExtension() ! { ! SaveDataForCurrentItem(0); ! } ! void CLangPref::OnSelchangesynfile() ! { ! SaveDataForCurrentItem(1); } ! void CLangPref::OnSelchangeCombo2() { ! SaveDataForCurrentItem(2); } --- 77,293 ---- BOOL CLangPref::OnInitDialog() { ! CFileFind ff; ! BOOL bff; ! CString szFileDirExtension; ! CSAPrefsSubDlg::OnInitDialog(); ! CConfigFile* pConfigFile; ! pConfigFile = (CConfigFile*)m_pDataFile; ! // Let's fill our language list ! FillLanguageList(); ! // Now let's fill the ComboBoxes with info. ! // First get the username of the current user ! TCHAR tcUserName[100]; ! unsigned long lSize = 100; ! if( !GetUserName( tcUserName, &lSize ) ) strcpy( tcUserName, "AnyUser" ); ! // Fill Syntax file list. ! szFileDirExtension = theApp.GetAppPath(); ! szFileDirExtension += CONFIG_DIR; ! szFileDirExtension += tcUserName; ! szFileDirExtension += '\\'; ! szFileDirExtension += SYNTAX_DIR; ! // Put an empty item to select no syntax file ! m_cbSyntaxFile.AddString( "" ); ! // Fill Syntax File list ! bff = ff.FindFile( szFileDirExtension + "*.syn" ); ! while( bff ) ! { ! bff = ff.FindNextFile(); ! if( bff && !ff.IsDirectory() && !ff.IsDots() ) ! { ! if( ff.GetFileName() != "default" ) m_cbSyntaxFile.AddString( ff.GetFileName() ); ! } ! } ! m_cbSyntaxFile.SetCurSel(0); ! // Put an empty item to select no auto completion file ! m_cbAutoCompFile.AddString( "" ); ! // Fill AutoComp file list ! bff = ff.FindFile( szFileDirExtension + "*.acmp" ); ! while( bff ) ! { ! bff = ff.FindNextFile(); ! if( bff && !ff.IsDirectory() && !ff.IsDots() ) ! { ! m_cbAutoCompFile.AddString( ff.GetFileName() ); ! } ! } ! m_cbAutoCompFile.SetCurSel(0); + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE } ! void CLangPref::FillLanguageList() { ! int iCount; ! int iNrOfLanguages; ! CConfigFile* pConfigFile; ! pConfigFile = (CConfigFile*)m_pDataFile; ! // Clear the list. ! m_lbLanguageList.ResetContent(); ! // Let's fill our language list ! iNrOfLanguages = pConfigFile->GetLanguageCount(); ! // Build our language tree with multiple color and font selection pages. ! for( iCount = 1; iCount < iNrOfLanguages; ++ iCount ) { ! m_lbLanguageList.InsertString( iCount - 1, pConfigFile->GetLanguageName( iCount ) ); ! } } ! void CLangPref::OnButtonAdd() { ! CString sName; ! CString sExtensions; ! CString sSyntaxFile; ! CString sAutoCompFile; ! CConfigFile* pConfigFile = (CConfigFile*)m_pDataFile; ! ! m_ebLangName.GetWindowText( sName ); ! if( sName.IsEmpty() ) ! { ! MessageBox( "You have to fill in a name for the language!", "Error" ); ! return; ! } ! m_ebExtensions.GetWindowText( sExtensions ); ! if( sExtensions.IsEmpty() ) ! { ! MessageBox( "You have to fill in at least one extension for the language!", "Error" ); ! return; ! } ! m_cbSyntaxFile.GetLBText( m_cbSyntaxFile.GetCurSel(), sSyntaxFile ); ! m_cbAutoCompFile.GetLBText( m_cbAutoCompFile.GetCurSel(), sAutoCompFile ); ! ! pConfigFile->AddLanguage( sName, sSyntaxFile, sAutoCompFile, sExtensions ); ! ! // Tell the parent of the changes. ! NotifyParentOfChange(); ! ! // Refill the list. ! FillLanguageList(); } ! void CLangPref::OnButtonChange() { ! BOOL bChanges; ! CString sTemp; ! CString sName; ! CString sExtensions; ! CConfigFile* pConfigFile = (CConfigFile*)m_pDataFile; ! if( m_lbLanguageList.GetCurSel() < 0 || m_lbLanguageList.GetCurSel() >= pConfigFile->GetLanguageCount() ) return; ! bChanges = FALSE; ! m_ebLangName.GetWindowText( sName ); ! if( sName.IsEmpty() ) ! { ! MessageBox( "You have to fill in a name for the language!", "Error" ); ! return; ! } ! m_ebExtensions.GetWindowText( sExtensions ); ! if( sExtensions.IsEmpty() ) ! { ! MessageBox( "You have to fill in at least one extension for the language!", "Error" ); ! return; ! } ! if( pConfigFile->GetLanguageName( m_lbLanguageList.GetCurSel() + 1 ) != sName ) ! { ! pConfigFile->SetLanguageName( m_lbLanguageList.GetCurSel() + 1, sName ); ! bChanges = true; ! } ! m_cbSyntaxFile.GetLBText( m_cbSyntaxFile.GetCurSel(), sTemp ); ! if( pConfigFile->GetLanguageSyntaxFileName( m_lbLanguageList.GetCurSel() + 1 ) != sTemp ) ! { ! pConfigFile->SetLanguageSyntaxFileName( m_lbLanguageList.GetCurSel() + 1, sTemp ); ! bChanges = true; ! } ! m_cbAutoCompFile.GetLBText( m_cbAutoCompFile.GetCurSel(), sTemp ); ! if( pConfigFile->GetLanguageAutoCompFileName( m_lbLanguageList.GetCurSel() + 1 ) != sTemp ) ! { ! pConfigFile->SetLanguageAutoCompFileName( m_lbLanguageList.GetCurSel() + 1, sTemp ); ! bChanges = true; ! } ! if( pConfigFile->GetLanguageExtensions( m_lbLanguageList.GetCurSel() + 1 ) != sExtensions ) ! { ! pConfigFile->SetLanguageExtensions( m_lbLanguageList.GetCurSel() + 1, sExtensions ); ! bChanges = true; ! } ! ! // Tell the parent of the changes. ! if( bChanges ) ! { ! NotifyParentOfChange(); ! ! int iSelected; ! ! iSelected = m_lbLanguageList.GetCurSel(); ! ! // Refill the list. ! FillLanguageList(); + // Reselected the item, that was selected before the refill. + if( iSelected > 0 ) m_lbLanguageList.SetCurSel( iSelected ); + } } ! void CLangPref::OnButtonRemove() { ! CConfigFile* pConfigFile = (CConfigFile*)m_pDataFile; ! if( m_lbLanguageList.GetCurSel() < 0 || m_lbLanguageList.GetCurSel() >= pConfigFile->GetLanguageCount() ) return; ! ! pConfigFile->RemoveLanguage( m_lbLanguageList.GetCurSel() + 1 ); ! // Tell the parent of the changes. ! NotifyParentOfChange(); ! // Refill the list. ! FillLanguageList(); } ! void CLangPref::OnSelectListLanguages() { ! CConfigFile* pConfigFile = (CConfigFile*)m_pDataFile; ! m_ebLangName.SetWindowText( pConfigFile->GetLanguageName( m_lbLanguageList.GetCurSel() + 1 ) ); ! m_ebExtensions.SetWindowText( pConfigFile->GetLanguageExtensions( m_lbLanguageList.GetCurSel() + 1 ) ); ! if( pConfigFile->GetLanguageSyntaxFileName( m_lbLanguageList.GetCurSel() + 1 ).IsEmpty() ) ! { ! m_cbSyntaxFile.SetCurSel( 0 ); ! } ! else ! { ! m_cbSyntaxFile.SelectString( 0, pConfigFile->GetLanguageSyntaxFileName( m_lbLanguageList.GetCurSel() + 1 ) ); ! } ! if( pConfigFile->GetLanguageAutoCompFileName( m_lbLanguageList.GetCurSel() + 1 ).IsEmpty() ) ! { ! m_cbAutoCompFile.SetCurSel( 0 ); ! } ! else ! { ! m_cbAutoCompFile.SelectString( 0, pConfigFile->GetLanguageAutoCompFileName( m_lbLanguageList.GetCurSel() + 1 ) ); ! } } Index: LangPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/LangPref.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LangPref.h 8 May 2003 12:00:56 -0000 1.2 --- LangPref.h 15 Mar 2004 08:51:53 -0000 1.3 *************** *** 11,33 **** #include "RegProfile.h" ! class CLangPref; ! ! class CLangList : public CBCGEditListBox ! { ! public: ! CLangList(CLangPref* pParent) : ! m_pParent (pParent) ! {} ! ! virtual BOOL EditItem(int iIndex) ! { ! return FALSE; ! } ! virtual void OnSelectionChanged (); ! virtual BOOL OnBeforeRemoveItem (int iItem); ! void ClearAll(); ! CLangPref* m_pParent; - }; ///////////////////////////////////////////////////////////////////////////// // CLangPref dialog --- 11,16 ---- #include "RegProfile.h" ! //class CLangPref; ///////////////////////////////////////////////////////////////////////////// // CLangPref dialog *************** *** 43,55 **** // Dialog Data //{{AFX_DATA(CLangPref) ! enum { IDD = IDD_PREF_LANG }; ! CComboBox m_autocompfile; ! CComboBox m_syntaxfile; ! CEdit m_extension; ! CEdit m_description; ! CLangList m_langList; ! //}}AFX_DATA ! CRegProfile m_reg; ! CMisc msc; // Overrides // ClassWizard generated virtual function overrides --- 26,37 ---- // Dialog Data //{{AFX_DATA(CLangPref) ! enum { IDD = IDD_PREF_LANG }; ! CListBox m_lbLanguageList; ! CEdit m_ebLangName; ! CEdit m_ebExtensions; ! CComboBox m_cbSyntaxFile; ! CComboBox m_cbAutoCompFile; ! //}}AFX_DATA ! // Overrides // ClassWizard generated virtual function overrides *************** *** 61,77 **** // Implementation protected: ! void SaveDataForCurrentItem(int i); // Generated message map functions //{{AFX_MSG(CLangPref) virtual BOOL OnInitDialog(); ! afx_msg void OnAddNewLang(); ! afx_msg void OnRemoveLang(); ! afx_msg void OnDestroy(); ! afx_msg void OnChangeExtension(); ! afx_msg void OnSelchangesynfile(); ! afx_msg void OnSelchangeCombo2(); ! //}}AFX_MSG ! void RewriteLanguages(); ! void LoadLangToList(); DECLARE_MESSAGE_MAP() }; --- 43,56 ---- // Implementation protected: ! // void SaveDataForCurrentItem(int i); // Generated message map functions //{{AFX_MSG(CLangPref) virtual BOOL OnInitDialog(); ! afx_msg void OnButtonAdd(); ! afx_msg void OnButtonRemove(); ! afx_msg void OnButtonChange(); ! afx_msg void OnSelectListLanguages(); ! //}}AFX_MSG ! void FillLanguageList(); DECLARE_MESSAGE_MAP() }; Index: SAPrefsDialog.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsDialog.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SAPrefsDialog.cpp 26 Feb 2004 08:44:16 -0000 1.6 --- SAPrefsDialog.cpp 15 Mar 2004 08:51:53 -0000 1.7 *************** *** 189,197 **** // i'm finishing the other preference pages. - AddPage( dlgGeneral, "General" ); - AddPage( dlgLang, "Languages" ); pConfigFile = theApp.GetConfigFile(); if( NULL == pConfigFile ) return -1; iNrOfLanguages = pConfigFile->GetLanguageCount(); --- 189,199 ---- // i'm finishing the other preference pages. pConfigFile = theApp.GetConfigFile(); if( NULL == pConfigFile ) return -1; + AddPage( dlgGeneral, "General" ); + AddPage( dlgLang, "Languages" ); + dlgLang.SetDataFile( pConfigFile ); + iNrOfLanguages = pConfigFile->GetLanguageCount(); *************** *** 211,221 **** pSyntaxFile = theApp.GetSyntaxFile( iCount ); AddPage( m_pEditorPref[iCount], pConfigFile->GetLanguageName( iCount ), &dlgLang ); ! m_pEditorPref[iCount].SetSyntaxFile( pSyntaxFile ); AddPage( m_pCodingPref[iCount], "Code", &m_pEditorPref[iCount] ); ! m_pCodingPref[iCount].SetSyntaxFile( pSyntaxFile ); AddPage( m_pColorPref[iCount], "Color", &m_pEditorPref[iCount] ); ! m_pColorPref[iCount].SetSyntaxFile( pSyntaxFile ); AddPage( m_pFontPref[iCount], "Font", &m_pEditorPref[iCount] ); ! m_pFontPref[iCount].SetSyntaxFile( pSyntaxFile ); } --- 213,223 ---- pSyntaxFile = theApp.GetSyntaxFile( iCount ); AddPage( m_pEditorPref[iCount], pConfigFile->GetLanguageName( iCount ), &dlgLang ); ! m_pEditorPref[iCount].SetDataFile( (CObject*)pSyntaxFile ); AddPage( m_pCodingPref[iCount], "Code", &m_pEditorPref[iCount] ); ! m_pCodingPref[iCount].SetDataFile( (CObject*)pSyntaxFile ); AddPage( m_pColorPref[iCount], "Color", &m_pEditorPref[iCount] ); ! m_pColorPref[iCount].SetDataFile( (CObject*)pSyntaxFile ); AddPage( m_pFontPref[iCount], "Font", &m_pEditorPref[iCount] ); ! m_pFontPref[iCount].SetDataFile( (CObject*)pSyntaxFile ); } *************** *** 520,523 **** --- 522,526 ---- BOOL bOK = true; CSyntaxFile* pSyntaxFile; + CConfigFile* pConfigFile; CSAPrefsSubDlg * pPage = NULL; *************** *** 574,577 **** --- 577,588 ---- pSyntaxFile->Save(); } + + } + bChanged = FALSE; + bChanged |= dlgLang.SaveChanges(); + if( bChanged ) + { + pConfigFile = theApp.GetConfigFile(); + pConfigFile->Save(); } } Index: SAPrefsSubDlg.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsSubDlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SAPrefsSubDlg.cpp 21 Feb 2004 12:14:05 -0000 1.3 --- SAPrefsSubDlg.cpp 15 Mar 2004 08:51:53 -0000 1.4 *************** *** 109,115 **** } ! void CSAPrefsSubDlg::SetSyntaxFile( CSyntaxFile* lpSyntaxFile ) { ! m_pSyntaxFile = lpSyntaxFile; } --- 109,115 ---- } ! void CSAPrefsSubDlg::SetDataFile( CObject* lpDataFile ) { ! m_pDataFile = lpDataFile; } Index: SAPrefsSubDlg.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsSubDlg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SAPrefsSubDlg.h 21 Feb 2004 12:14:05 -0000 1.4 --- SAPrefsSubDlg.h 15 Mar 2004 08:51:53 -0000 1.5 *************** *** 45,49 **** protected: BOOL bChanged; ! CSyntaxFile* m_pSyntaxFile; public: --- 45,49 ---- protected: BOOL bChanged; ! CObject* m_pDataFile; public: *************** *** 62,66 **** virtual void OnOK(); virtual void OnCancel(); ! virtual void SetSyntaxFile( CSyntaxFile* lpSyntaxFile ); virtual BOOL SaveChanges(); virtual void NotifyParentOfChange(); --- 62,66 ---- virtual void OnOK(); virtual void OnCancel(); ! virtual void SetDataFile( CObject* lpDataFile ); virtual BOOL SaveChanges(); virtual void NotifyParentOfChange(); Index: SyntaxFile.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SyntaxFile.h 26 Feb 2004 08:44:16 -0000 1.5 --- SyntaxFile.h 15 Mar 2004 08:51:53 -0000 1.6 *************** *** 101,105 **** ! class CSyntaxFile { protected: --- 101,105 ---- ! class CSyntaxFile : public CObject { protected: Index: resource.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/resource.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** resource.h 26 Feb 2004 08:44:16 -0000 1.21 --- resource.h 15 Mar 2004 08:51:53 -0000 1.22 *************** *** 107,110 **** --- 107,111 ---- #define IDB_OUTBAR 251 #define IDR_VIEW 252 + #define IDD_DIALOG3 252 #define IDD_WIN2K_FILEDIALOG 446 #define IDB_FILEOPEN 447 *************** *** 226,229 **** --- 227,238 ---- #define IDC_EDIT_CVPARSERDELAY 1118 #define stc32 0x045f + #define IDC_LIST_LANGUAGES 1119 + #define IDC_EDIT_NAME 1120 + #define IDC_EDIT_EXTENSIONS 1121 + #define IDC_COMBO_SYNTAXFILE 1122 + #define IDC_COMBO_AUTOCOMPFILE 1123 + #define IDC_BUTTON_ADD 1124 + #define IDC_BUTTON_REMOVE 1125 + #define IDC_BUTTON_CHANGE 1126 #define IDC_OUTLOOK_BAR_PLACEHOLDER 1432 #define ID_BTN_HISTORY 0x1001 *************** *** 508,514 **** #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 ! #define _APS_NEXT_RESOURCE_VALUE 252 #define _APS_NEXT_COMMAND_VALUE 33075 ! #define _APS_NEXT_CONTROL_VALUE 1119 #define _APS_NEXT_SYMED_VALUE 105 #endif --- 517,523 ---- #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 ! #define _APS_NEXT_RESOURCE_VALUE 253 #define _APS_NEXT_COMMAND_VALUE 33075 ! #define _APS_NEXT_CONTROL_VALUE 1127 #define _APS_NEXT_SYMED_VALUE 105 #endif |
From: <moo...@us...> - 2004-02-27 08:53:58
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29895 Modified Files: ChangeLog.txt scintillaif.cpp Log Message: Automatically set EOL mode on OpenDocument. Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ChangeLog.txt,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ChangeLog.txt 26 Feb 2004 08:44:16 -0000 1.39 --- ChangeLog.txt 27 Feb 2004 08:45:22 -0000 1.40 *************** *** 14,17 **** --- 14,18 ---- 9) AutoIndent added when pressing Braces. Enable the AutoIndent follow Language Scoping to use it. 10) Preferences changes - Code Options (Highlighting, AutoCompletion, ClassView) [#715770] + 11) Automatically set EOL mode on OpenDocument Beta 2.0 [Tester's Release 2] Index: scintillaif.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/scintillaif.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** scintillaif.cpp 26 Feb 2004 08:44:16 -0000 1.13 --- scintillaif.cpp 27 Feb 2004 08:45:22 -0000 1.14 *************** *** 58,61 **** --- 58,67 ---- BOOL CScintilla::OpenFile(LPCTSTR filename) { + int iLinesCR; + int iLinesLF; + int iLinesCRLF; + int iLineCount; + int iCurrentLine; + int iLineEndPos; FILE *fp = fopen(filename, "rb"); if (fp) *************** *** 76,80 **** SPerform(SCI_SETSAVEPOINT); SPerform(SCI_SETLAYOUTCACHE,0); ! fclose(fp); return true; } --- 82,116 ---- SPerform(SCI_SETSAVEPOINT); SPerform(SCI_SETLAYOUTCACHE,0); ! ! // Try to figure out the EOL mode of the document. ! iLinesCR = 0; ! iLinesLF = 0; ! iLinesCRLF = 0; ! iLineEndPos = 0; ! iCurrentLine = 0; ! iLineCount = SPerform( SCI_GETLINECOUNT ); ! while( iLinesCR < 10 && iLinesLF < 10 && iLinesCRLF < 10 && iCurrentLine < iLineCount ) ! { ! iLineEndPos = SPerform( SCI_GETLINEENDPOSITION, iCurrentLine ); ! if( iLineEndPos <= 0 ) break; // reached the end so stop ! if( iLineEndPos + 2 > SPerform( SCI_GETLENGTH ) ) break; // reached end. ! if( SPerform( SCI_GETCHARAT, iLineEndPos + 1 ) == '\r' ) ! { ! if( SPerform( SCI_GETCHARAT, iLineEndPos + 2 ) == '\n' ) ! { ! ++ iLinesCRLF; ! } ! else ! { ! ++ iLinesCR; ! } ! } ! if( SPerform( SCI_GETCHARAT, iLineEndPos + 1 ) == '\n' ) ++ iLinesLF; ! ++ iCurrentLine; ! } ! // Set the calculated EOL mode ! if( iLinesCR > iLinesLF && iLinesCR > iLinesCRLF ) SPerform( SCI_SETEOLMODE, SC_EOL_CR ); ! else if( iLinesLF > iLinesCR && iLinesLF > iLinesCRLF ) SPerform( SCI_SETEOLMODE, SC_EOL_LF ); ! else SPerform( SCI_SETEOLMODE, SC_EOL_CRLF ); return true; } |
From: <moo...@us...> - 2004-02-26 18:08:38
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17960 Modified Files: CodingPref.cpp Log Message: CodingPref small bug fix. Index: CodingPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/CodingPref.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CodingPref.cpp 26 Feb 2004 08:44:16 -0000 1.6 --- CodingPref.cpp 26 Feb 2004 18:00:32 -0000 1.7 *************** *** 85,90 **** ON_BN_CLICKED(IDC_RADIO_ACKEY1, OnControlChanged) ON_BN_CLICKED(IDC_RADIO_ACKEY2, OnControlChanged) - ON_BN_CLICKED(IDC_RADIO_CVF1, OnControlChanged) - ON_BN_CLICKED(IDC_RADIO_CVF2, OnControlChanged) ON_WM_HSCROLL() //}}AFX_MSG_MAP --- 85,88 ---- |
Update of /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3477/Config/Default/Syntax Modified Files: cpp.syn default.syn java.syn javascript.syn masm.syn perl.syn python.syn Log Message: Syntax File Update - Extra options added to the Syntax Files. - New compatible executable. Index: cpp.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/cpp.syn,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cpp.syn 21 Feb 2004 11:58:52 -0000 1.2 --- cpp.syn 26 Feb 2004 08:51:02 -0000 1.3 *************** *** 6,11 **** </Lexer> <View> - <SyntaxHighlighting>1</SyntaxHighlighting> - <HighlightCurrentLine>1</HighlightCurrentLine> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> --- 6,9 ---- *************** *** 16,19 **** --- 14,32 ---- <RightEdgeColumn>80</RightEdgeColumn> </View> + <CodeHighlight> + <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <BraceMatching>1</BraceMatching> + </CodeHighlight> + <AutoComp> + <AutoCompletion>0</AutoCompletion> + <CodeCompletion>0</CodeCompletion> + <AutoCompKey>0</AutoCompKey> + </AutoComp> + <ClassView> + <ClassViewOn>1</ClassViewOn> + <SortClassView>1</SortClassView> + <ParserDelay>1500</ParserDelay> + </ClassView> <Indent> <Indent>1</Indent> Index: default.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/default.syn,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** default.syn 21 Feb 2004 11:58:53 -0000 1.2 --- default.syn 26 Feb 2004 08:51:02 -0000 1.3 *************** *** 1,6 **** <Syntax> <View> - <SyntaxHighlighting>0</SyntaxHighlighting> - <HighlightCurrentLine>1</HighlightCurrentLine> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> --- 1,4 ---- *************** *** 11,14 **** --- 9,27 ---- <RightEdgeColumn>80</RightEdgeColumn> </View> + <CodeHighlight> + <SyntaxHighlighting>0</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <BraceMatching>0</BraceMatching> + </CodeHighlight> + <AutoComp> + <AutoCompletion>0</AutoCompletion> + <CodeCompletion>0</CodeCompletion> + <AutoCompKey>0</AutoCompKey> + </AutoComp> + <ClassView> + <ClassViewOn>0</ClassViewOn> + <SortClassView>0</SortClassView> + <ParserDelay>1500</ParserDelay> + </ClassView> <Indent> <Indent>0</Indent> *************** *** 18,22 **** </Indent> <Margins> ! <LineNumbers>0</LineNumbers> <BookMark>0</BookMark> <Fold>0</Fold> --- 31,35 ---- </Indent> <Margins> ! <LineNumbers>1</LineNumbers> <BookMark>0</BookMark> <Fold>0</Fold> Index: java.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/java.syn,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** java.syn 21 Feb 2004 11:58:53 -0000 1.2 --- java.syn 26 Feb 2004 08:51:02 -0000 1.3 *************** *** 6,11 **** </Lexer> <View> - <SyntaxHighlighting>1</SyntaxHighlighting> - <HighlightCurrentLine>1</HighlightCurrentLine> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> --- 6,9 ---- *************** *** 16,19 **** --- 14,32 ---- <RightEdgeColumn>80</RightEdgeColumn> </View> + <CodeHighlight> + <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <BraceMatching>1</BraceMatching> + </CodeHighlight> + <AutoComp> + <AutoCompletion>0</AutoCompletion> + <CodeCompletion>0</CodeCompletion> + <AutoCompKey>0</AutoCompKey> + </AutoComp> + <ClassView> + <ClassViewOn>1</ClassViewOn> + <SortClassView>1</SortClassView> + <ParserDelay>1500</ParserDelay> + </ClassView> <Indent> <Indent>1</Indent> Index: javascript.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/javascript.syn,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** javascript.syn 21 Feb 2004 11:58:53 -0000 1.2 --- javascript.syn 26 Feb 2004 08:51:02 -0000 1.3 *************** *** 6,11 **** </Lexer> <View> - <SyntaxHighlighting>1</SyntaxHighlighting> - <HighlightCurrentLine>1</HighlightCurrentLine> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> --- 6,9 ---- *************** *** 16,19 **** --- 14,32 ---- <RightEdgeColumn>80</RightEdgeColumn> </View> + <CodeHighlight> + <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <BraceMatching>1</BraceMatching> + </CodeHighlight> + <AutoComp> + <AutoCompletion>0</AutoCompletion> + <CodeCompletion>0</CodeCompletion> + <AutoCompKey>0</AutoCompKey> + </AutoComp> + <ClassView> + <ClassViewOn>1</ClassViewOn> + <SortClassView>1</SortClassView> + <ParserDelay>1500</ParserDelay> + </ClassView> <Indent> <Indent>1</Indent> Index: masm.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/masm.syn,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** masm.syn 21 Feb 2004 11:58:53 -0000 1.2 --- masm.syn 26 Feb 2004 08:51:02 -0000 1.3 *************** *** 4,9 **** </Lexer> <View> - <SyntaxHighlighting>1</SyntaxHighlighting> - <HighlightCurrentLine>1</HighlightCurrentLine> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> --- 4,7 ---- *************** *** 14,17 **** --- 12,30 ---- <RightEdgeColumn>80</RightEdgeColumn> </View> + <CodeHighlight> + <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <BraceMatching>0</BraceMatching> + </CodeHighlight> + <AutoComp> + <AutoCompletion>0</AutoCompletion> + <CodeCompletion>0</CodeCompletion> + <AutoCompKey>0</AutoCompKey> + </AutoComp> + <ClassView> + <ClassViewOn>0</ClassViewOn> + <SortClassView>0</SortClassView> + <ParserDelay>1500</ParserDelay> + </ClassView> <Indent> <Indent>1</Indent> Index: perl.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/perl.syn,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** perl.syn 21 Feb 2004 11:58:53 -0000 1.2 --- perl.syn 26 Feb 2004 08:51:02 -0000 1.3 *************** *** 6,11 **** </Lexer> <View> - <SyntaxHighlighting>1</SyntaxHighlighting> - <HighlightCurrentLine>1</HighlightCurrentLine> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> --- 6,9 ---- *************** *** 16,19 **** --- 14,32 ---- <RightEdgeColumn>80</RightEdgeColumn> </View> + <CodeHighlight> + <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <BraceMatching>1</BraceMatching> + </CodeHighlight> + <AutoComp> + <AutoCompletion>0</AutoCompletion> + <CodeCompletion>0</CodeCompletion> + <AutoCompKey>0</AutoCompKey> + </AutoComp> + <ClassView> + <ClassViewOn>1</ClassViewOn> + <SortClassView>1</SortClassView> + <ParserDelay>1500</ParserDelay> + </ClassView> <Indent> <Indent>1</Indent> Index: python.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/python.syn,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** python.syn 21 Feb 2004 11:58:53 -0000 1.2 --- python.syn 26 Feb 2004 08:51:02 -0000 1.3 *************** *** 6,11 **** </Lexer> <View> - <SyntaxHighlighting>1</SyntaxHighlighting> - <HighlightCurrentLine>1</HighlightCurrentLine> <WhiteSpace>0</WhiteSpace> <EOL>0</EOL> --- 6,9 ---- *************** *** 16,19 **** --- 14,32 ---- <RightEdgeColumn>80</RightEdgeColumn> </View> + <CodeHighlight> + <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <BraceMatching>1</BraceMatching> + </CodeHighlight> + <AutoComp> + <AutoCompletion>0</AutoCompletion> + <CodeCompletion>0</CodeCompletion> + <AutoCompKey>0</AutoCompKey> + </AutoComp> + <ClassView> + <ClassViewOn>1</ClassViewOn> + <SortClassView>1</SortClassView> + <ParserDelay>1500</ParserDelay> + </ClassView> <Indent> <Indent>1</Indent> |
From: <moo...@us...> - 2004-02-26 08:58:50
|
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3477 Modified Files: AnyEdit.exe Log Message: Syntax File Update - Extra options added to the Syntax Files. - New compatible executable. Index: AnyEdit.exe =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/AnyEdit.exe,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 Binary files /tmp/cvsdA3uu1 and /tmp/cvsiC373g differ |
From: <moo...@us...> - 2004-02-26 08:52:07
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2941 Modified Files: AnyEdit.rc AnyEditDoc.cpp AnyEditView.cpp ChangeLog.txt CodingPref.cpp CodingPref.h ColorPref.h EditorPref.h FontPref.h SAPrefsDialog.cpp SAPrefsDialog.h SyntaxFile.cpp SyntaxFile.h resource.h scintillaif.cpp scintillaif.h Log Message: Preferences Update - Code Prefs (Highlighting, Auto Completion and Class View) - CCodingPref, rewritten. - CAnyEditDoc, updated the SetScintillaProperties. - CSyntaxFile functions for the new settings. - CSyntaxFile cleanup the code with some protected functions. - *Pref.h protected the member variables. - CScintilla protected the autoindent value and added access functions. - CAnyEditView changed autoindent access. Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** AnyEdit.rc 21 Feb 2004 12:14:05 -0000 1.32 --- AnyEdit.rc 26 Feb 2004 08:44:16 -0000 1.33 *************** *** 1453,1491 **** FONT 8, "MS Sans Serif" BEGIN ! CONTROL "Enable Code Completion",IDC_CHECK1,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,7,18,92,15 ! CONTROL "Enable Auto Completion",IDC_CHECK2,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,7,36,94,14 ! CONTROL "Enable Brace Matching",IDC_CHECK3,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,137,19,90,15 ! CONTROL "Highlight Current Line",IDC_CHECK4,"Button", ! BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,137,35,87, ! 17 ! GROUPBOX "Auto Completion Key",IDC_STATIC,7,60,118,41,WS_GROUP ! CONTROL "Tab Key",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,13,71, ! 86,11 ! CONTROL "Space Bar Key",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON, ! 13,87,83,10 ! GROUPBOX "Auto Indentation Style",IDC_STATIC,7,107,117,54, ! WS_GROUP ! CONTROL "Off",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,15,118,94,9 ! CONTROL "Follow Language Scoping",IDC_RADIO4,"Button", ! BS_AUTORADIOBUTTON,15,131,99,13 ! CONTROL "Follow Previous Line",IDC_RADIO5,"Button", ! BS_AUTORADIOBUTTON,15,145,99,12 ! GROUPBOX "Class View Parser Delay",IDC_STATIC,136,60,143,41 ! CONTROL "Slider2",IDC_SLIDER2,"msctls_trackbar32",TBS_AUTOTICKS | ! TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,139,72,137,12 ! EDITTEXT IDC_EDIT1,194,85,28,12,ES_AUTOHSCROLL | ES_READONLY | ! NOT WS_BORDER ! CONTROL "Enable Class View Display",IDC_CHECK5,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,139,119,128,12 ! GROUPBOX "Class View Information",IDC_STATIC,136,106,144,70 ! CONTROL "Show Class View For Current Document",IDC_RADIO6,"Button", ! BS_AUTORADIOBUTTON,138,149,138,12 ! CONTROL "Show Class View For Entire Project",IDC_RADIO7,"Button", ! BS_AUTORADIOBUTTON,138,163,136,11 ! CONTROL "Sort Functions Alphabetically",IDC_CHECK9,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,139,133,128,12 END --- 1453,1483 ---- FONT 8, "MS Sans Serif" BEGIN ! CONTROL "Code Completion",IDC_CHECK_CODECOMP,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,13,85,69,10 ! CONTROL "Auto Completion",IDC_CHECK_AUTOCOMP,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,13,73,67,10 ! CONTROL "Brace Matching",IDC_CHECK_BRACEMATCH,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,13,43,66,10 ! CONTROL "Syntax Highlighting",IDC_CHECK_SYNTAXHIGHLIGHTING, ! "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,19,76,10 ! GROUPBOX "Auto Completion",IDC_STATIC,7,64,123,59,WS_GROUP ! CONTROL "Tab Key",IDC_RADIO_ACKEY1,"Button",BS_AUTORADIOBUTTON | ! WS_GROUP,13,96,43,10 ! CONTROL "Space Bar Key",IDC_RADIO_ACKEY2,"Button", ! BS_AUTORADIOBUTTON,13,107,63,10 ! CONTROL "Slider2",IDC_SLIDER_CVPARSEDELAY,"msctls_trackbar32", ! TBS_AUTOTICKS | TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,144, ! 55,128,12 ! EDITTEXT IDC_EDIT_CVPARSERDELAY,188,68,28,12,ES_AUTOHSCROLL | ! ES_READONLY | NOT WS_BORDER ! CONTROL "Class View Display",IDC_CHECK_CLASSVIEW,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,142,17,75,10 ! GROUPBOX "Class View",IDC_STATIC,136,7,144,75 ! CONTROL "Sort Class View",IDC_CHECK_CVSORTALPH,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,142,30,65,10 ! CONTROL "Highlight Current Line",IDC_CHECK_HIGHLIGHTLINE,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,13,31,83,10 ! LTEXT "Parser Delay",IDC_STATIC,142,43,41,8 ! GROUPBOX "Code Highlighting",IDC_STATIC,7,7,123,52 END Index: AnyEditDoc.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditDoc.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AnyEditDoc.cpp 23 Feb 2004 14:24:40 -0000 1.17 --- AnyEditDoc.cpp 26 Feb 2004 08:44:16 -0000 1.18 *************** *** 390,400 **** m_pScintilla->SetCaretWidth( 1 ); - // Indentation - m_pScintilla->SetTabIndents( pSyntaxFile->GetIndent() ? 1 : 0 ); - m_pScintilla->SetBackSpaceUnIndents( pSyntaxFile->GetIndent() ? 1 : 0 ); - m_pScintilla->SetIndent( pSyntaxFile->GetIndentSize() ); - m_pScintilla->autoindent = pSyntaxFile->GetAutoIndent(); - m_pScintilla->SetIndentationGuides( pSyntaxFile->GetIndentGuides() ? 1 : 0 ); - // Set margins. // LineNumbers --- 390,393 ---- *************** *** 423,426 **** --- 416,426 ---- m_pScintilla->SetEdgeColumn( pSyntaxFile->GetRightEdgeColumn() ); + // Indentation + m_pScintilla->SetTabIndents( pSyntaxFile->GetIndent() ? 1 : 0 ); + m_pScintilla->SetBackSpaceUnIndents( pSyntaxFile->GetIndent() ? 1 : 0 ); + m_pScintilla->SetIndent( pSyntaxFile->GetIndentSize() ); + m_pScintilla->SetAutoIndent( pSyntaxFile->GetAutoIndent() ); + m_pScintilla->SetIndentationGuides( pSyntaxFile->GetIndentGuides() ? 1 : 0 ); + // Set the number of Stylebits iTemp = pSyntaxFile->GetStyleBits(); Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** AnyEditView.cpp 24 Feb 2004 19:22:17 -0000 1.46 --- AnyEditView.cpp 26 Feb 2004 08:44:16 -0000 1.47 *************** *** 412,416 **** case SCN_CHARADDED: ! if( ( scn->ch == '\r' || scn->ch == '\n' ) && m_Scintilla.autoindent >= 1 ) { int pos; --- 412,416 ---- case SCN_CHARADDED: ! if( ( scn->ch == '\r' || scn->ch == '\n' ) && m_Scintilla.GetAutoIndent() >= 1 ) { int pos; *************** *** 423,427 **** iIndentation = m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ); // May we do extra indentation? ! if( m_Scintilla.autoindent >= 2 ) { // Get the position before the EOL characters --- 423,427 ---- iIndentation = m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ); // May we do extra indentation? ! if( m_Scintilla.GetAutoIndent() >= 2 ) { // Get the position before the EOL characters *************** *** 440,444 **** SetLineIndentation( m_Scintilla.GetCurLineNumber(), iIndentation ); } ! if( scn->ch == '}' && m_Scintilla.autoindent >= 2 ) { int iIndentation; --- 440,444 ---- SetLineIndentation( m_Scintilla.GetCurLineNumber(), iIndentation ); } ! if( scn->ch == '}' && m_Scintilla.GetAutoIndent() >= 2 ) { int iIndentation; Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ChangeLog.txt,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ChangeLog.txt 23 Feb 2004 14:30:59 -0000 1.38 --- ChangeLog.txt 26 Feb 2004 08:44:16 -0000 1.39 *************** *** 7,16 **** 2) Added document position saving support 3) New syntax file implementation ! 4) Preferences changes - Color/Font and Apply button addition 5) Simple document Print Support [#713838] ! 6) Preferences changes - Document (Editor) Options (margins, tabs, indent, whitespace) [#782376,#787902] 7) Fixed Save As, which didn't save the file if it wasn't modified. ! 8) Rewrite check for modified files outside AE. Also moved it from the View to the Document class. 9) AutoIndent added when pressing Braces. Enable the AutoIndent follow Language Scoping to use it. Beta 2.0 [Tester's Release 2] --- 7,17 ---- 2) Added document position saving support 3) New syntax file implementation ! 4) Preferences changes - Color/Font and Apply button addition [#713454] 5) Simple document Print Support [#713838] ! 6) Preferences changes - Document (Editor) Options (margins, tabs, indent, whitespace) [#782376,#787902,#798524] 7) Fixed Save As, which didn't save the file if it wasn't modified. ! 8) Rewrite check for modified files outside AE. Also moved it from the View to the Document class. [#810821] 9) AutoIndent added when pressing Braces. Enable the AutoIndent follow Language Scoping to use it. + 10) Preferences changes - Code Options (Highlighting, AutoCompletion, ClassView) [#715770] Beta 2.0 [Tester's Release 2] Index: CodingPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/CodingPref.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CodingPref.cpp 25 Nov 2003 15:05:56 -0000 1.5 --- CodingPref.cpp 26 Feb 2004 08:44:16 -0000 1.6 *************** *** 30,34 **** #include "anyedit.h" #include "CodingPref.h" - #include "Misc.h" #ifdef _DEBUG --- 30,33 ---- *************** *** 42,56 **** ! CCodingPref::CCodingPref(CWnd* pParent /*=NULL*/) ! : CSAPrefsSubDlg(CCodingPref::IDD, pParent) { //{{AFX_DATA_INIT(CCodingPref) ! m_matchBrace = FALSE; ! m_highlightLine = FALSE; ! m_codeCompletion = FALSE; ! m_autoCompletion = FALSE; ! m_enableClassView = FALSE; ! m_alphabetic = FALSE; ! //}}AFX_DATA_INIT } --- 41,56 ---- ! CCodingPref::CCodingPref(CWnd* pParent /*=NULL*/) : CSAPrefsSubDlg(CCodingPref::IDD, pParent) { //{{AFX_DATA_INIT(CCodingPref) ! m_bAutoComp = FALSE; ! m_bBraceMatch = FALSE; ! m_bClassView = FALSE; ! m_bCodeComp = FALSE; ! m_bCVSorted = FALSE; ! m_bHighlightLine = FALSE; ! m_bSyntaxHighlighting = FALSE; ! m_iAutoCompKey = -1; ! //}}AFX_DATA_INIT } *************** *** 60,74 **** CSAPrefsSubDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CCodingPref) ! DDX_Control(pDX, IDC_EDIT1, m_sliderVal); ! DDX_Control(pDX, IDC_SLIDER2, m_slider); ! DDX_Check(pDX, IDC_CHECK3, m_matchBrace); ! DDX_Check(pDX, IDC_CHECK4, m_highlightLine); ! DDX_Control(pDX, IDC_RADIO1, m_tabKey); ! DDX_Control(pDX, IDC_RADIO2, m_spaceKey); ! DDX_Check(pDX, IDC_CHECK1, m_codeCompletion); ! DDX_Check(pDX, IDC_CHECK2, m_autoCompletion); ! DDX_Check(pDX, IDC_CHECK5, m_enableClassView); ! DDX_Check(pDX, IDC_CHECK9, m_alphabetic); ! //}}AFX_DATA_MAP } --- 60,74 ---- CSAPrefsSubDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CCodingPref) ! DDX_Control(pDX, IDC_SLIDER_CVPARSEDELAY, m_ctrlSlider); ! DDX_Control(pDX, IDC_EDIT_CVPARSERDELAY, m_ctrlSliderEdit); ! DDX_Check(pDX, IDC_CHECK_AUTOCOMP, m_bAutoComp); ! DDX_Check(pDX, IDC_CHECK_BRACEMATCH, m_bBraceMatch); ! DDX_Check(pDX, IDC_CHECK_CLASSVIEW, m_bClassView); ! DDX_Check(pDX, IDC_CHECK_CODECOMP, m_bCodeComp); ! DDX_Check(pDX, IDC_CHECK_CVSORTALPH, m_bCVSorted); ! DDX_Check(pDX, IDC_CHECK_HIGHLIGHTLINE, m_bHighlightLine); ! DDX_Check(pDX, IDC_CHECK_SYNTAXHIGHLIGHTING, m_bSyntaxHighlighting); ! DDX_Radio(pDX, IDC_RADIO_ACKEY1, m_iAutoCompKey); ! //}}AFX_DATA_MAP } *************** *** 76,84 **** BEGIN_MESSAGE_MAP(CCodingPref, CSAPrefsSubDlg) //{{AFX_MSG_MAP(CCodingPref) ! ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLIDER2, OnReleasedcaptureSlider2) ! ON_NOTIFY(NM_CUSTOMDRAW, IDC_SLIDER2, OnCustomdrawSlider2) ! ON_WM_DESTROY() ! ON_WM_CREATE() ! //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 76,92 ---- BEGIN_MESSAGE_MAP(CCodingPref, CSAPrefsSubDlg) //{{AFX_MSG_MAP(CCodingPref) ! ON_BN_CLICKED(IDC_CHECK_AUTOCOMP, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_BRACEMATCH, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_CLASSVIEW, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_CODECOMP, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_CVSORTALPH, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_HIGHLIGHTLINE, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_SYNTAXHIGHLIGHTING, OnControlChanged) ! ON_BN_CLICKED(IDC_RADIO_ACKEY1, OnControlChanged) ! ON_BN_CLICKED(IDC_RADIO_ACKEY2, OnControlChanged) ! ON_BN_CLICKED(IDC_RADIO_CVF1, OnControlChanged) ! ON_BN_CLICKED(IDC_RADIO_CVF2, OnControlChanged) ! ON_WM_HSCROLL() ! //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 88,101 **** BOOL CCodingPref::OnInitDialog() { CSAPrefsSubDlg::OnInitDialog(); ! m_slider.SetRange(1000,5000); ! m_slider.SetPos(m_reg.GetProfileInt(_T("Preferences"),_T("ParserDelay"),1500)); ! int ackey = m_reg.GetProfileInt(_T("Preferences"),_T("ACKEY"),0); ! if(ackey==0) ! m_tabKey.SetCheck(1); ! else ! m_spaceKey.SetCheck(1); return TRUE; // return TRUE unless you set the focus to a control --- 96,121 ---- BOOL CCodingPref::OnInitDialog() { + CString szParserDelay; + CSAPrefsSubDlg::OnInitDialog(); ! // Read the values from the syntax file ! // Code Highlighting ! m_bSyntaxHighlighting = m_pSyntaxFile->GetSyntaxHighlighting(); ! m_bHighlightLine = m_pSyntaxFile->GetHighlightCurrentLine(); ! m_bBraceMatch = m_pSyntaxFile->GetBraceMatch(); ! // Auto Completion ! m_bAutoComp = m_pSyntaxFile->GetAutoCompletion(); ! m_bCodeComp = m_pSyntaxFile->GetCodeCompletion(); ! m_iAutoCompKey = m_pSyntaxFile->GetACKey(); ! // Class View ! m_bClassView = m_pSyntaxFile->GetClassView(); ! m_bCVSorted = m_pSyntaxFile->GetSortClassView(); ! m_ctrlSlider.SetRange( 1000, 5000 ); ! m_ctrlSlider.SetPos( m_pSyntaxFile->GetParserDelay() ); ! szParserDelay.Format( "%i ms", m_ctrlSlider.GetPos() ); ! m_ctrlSliderEdit.SetWindowText( szParserDelay ); ! UpdateData( FALSE ); return TRUE; // return TRUE unless you set the focus to a control *************** *** 103,164 **** } ! void CCodingPref::OnReleasedcaptureSlider2(NMHDR* pNMHDR, LRESULT* pResult) ! { ! m_reg.WriteProfileInt(_T("Preferences"),_T("ParserDelay"),m_slider.GetPos()); ! *pResult = 0; ! } ! ! void CCodingPref::OnCustomdrawSlider2(NMHDR* pNMHDR, LRESULT* pResult) ! { ! ! int i = m_slider.GetPos(); ! CMisc msc; ! m_sliderVal.SetWindowText(msc.GetStringForInt(i) + _T(" ms")); ! *pResult = 0; ! } ! ! void CCodingPref::OnDestroy() { ! CSAPrefsSubDlg::OnDestroy(); ! } ! void CCodingPref::OnOK() ! { ! int ackey=0; ! if(m_tabKey.GetCheck()==TRUE) ! ackey=0; ! else ! ackey=1; ! m_reg.WriteProfileInt(_T("Preferences"),_T("ACKEY"),ackey); ! //Saving coding preferences ! m_reg.WriteProfileInt(_T("Preferences"),_T("MatchBrace"),m_matchBrace); ! m_reg.WriteProfileInt(_T("Preferences"),_T("HighlightLine"),m_highlightLine); ! m_reg.WriteProfileInt(_T("Preferences"),_T("AutoCompletion"),m_autoCompletion); ! m_reg.WriteProfileInt(_T("Preferences"),_T("CodeCompletion"),m_codeCompletion); ! m_reg.WriteProfileInt(_T("Preferences"),_T("EnableClassView"),m_enableClassView); ! m_reg.WriteProfileInt(_T("Preferences"),_T("EnableAlphabetic"),m_alphabetic); ! CSAPrefsSubDlg::OnOK(); } ! void CCodingPref::OnCancel() { ! CSAPrefsSubDlg::OnCancel(); } ! ! int CCodingPref::OnCreate(LPCREATESTRUCT lpCreateStruct) { ! if (CSAPrefsSubDlg::OnCreate(lpCreateStruct) == -1) ! return -1; ! ! m_matchBrace = m_reg.GetProfileInt(_T("Preferences"),_T("MatchBrace"),1); ! m_highlightLine = m_reg.GetProfileInt(_T("Preferences"),_T("HighlightLine"),0); ! m_codeCompletion= m_reg.GetProfileInt(_T("Preferences"),_T("CodeCompletion"),1); ! m_autoCompletion = m_reg.GetProfileInt(_T("Preferences"),_T("AutoCompletion"),1); ! m_enableClassView = m_reg.GetProfileInt(_T("Preferences"),_T("EnableClassView"),1); ! m_enableClassView = m_reg.GetProfileInt(_T("Preferences"),_T("EnableClassView"),1); ! m_alphabetic = m_reg.GetProfileInt(_T("Preferences"),_T("EnableAlphabetic"),0); ! return 0; } --- 123,200 ---- } ! BOOL CCodingPref::SaveChanges() { ! // If the dialog hasn't been visible the handle is not valid. ! // But if it wasn't visible nothing has changed. ! if( !m_hWnd ) return false; ! UpdateData(); ! // Code Highlighting ! if( m_bSyntaxHighlighting != m_pSyntaxFile->GetSyntaxHighlighting() ) ! { ! m_pSyntaxFile->SetSyntaxHighlighting( m_bSyntaxHighlighting ); ! bChanged = true; ! } ! if( m_bHighlightLine != m_pSyntaxFile->GetHighlightCurrentLine() ) ! { ! m_pSyntaxFile->SetHighlightCurrentLine( m_bHighlightLine ); ! bChanged = true; ! } ! if( m_bBraceMatch != m_pSyntaxFile->GetBraceMatch() ) ! { ! m_pSyntaxFile->SetBraceMatch( m_bBraceMatch ); ! bChanged = true; ! } ! // Auto Completion ! if( m_bAutoComp != m_pSyntaxFile->GetAutoCompletion() ) ! { ! m_pSyntaxFile->SetAutoCompletion( m_bAutoComp ); ! bChanged = true; ! } ! if( m_bCodeComp != m_pSyntaxFile->GetCodeCompletion() ) ! { ! m_pSyntaxFile->SetCodeCompletion( m_bCodeComp ); ! bChanged = true; ! } ! if( m_iAutoCompKey != m_pSyntaxFile->GetACKey() ) ! { ! m_pSyntaxFile->SetACKey( m_iAutoCompKey ); ! bChanged = true; ! } ! // Class View ! if( m_bClassView != m_pSyntaxFile->GetClassView() ) ! { ! m_pSyntaxFile->SetClassView( m_bClassView ); ! bChanged = true; ! } ! if( m_bCVSorted != m_pSyntaxFile->GetSortClassView() ) ! { ! m_pSyntaxFile->SetSortClassView( m_bCVSorted ); ! bChanged = true; ! } ! if( m_ctrlSlider.GetPos() != m_pSyntaxFile->GetParserDelay() ) ! { ! m_pSyntaxFile->SetParserDelay( m_ctrlSlider.GetPos() ); ! bChanged = true; ! } ! return bChanged; } ! void CCodingPref::OnControlChanged() { ! NotifyParentOfChange(); } ! void CCodingPref::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { ! if( &m_ctrlSlider == (CSliderCtrl*)pScrollBar ) ! { ! CString szParserDelay; ! szParserDelay.Format( "%i ms", m_ctrlSlider.GetPos() ); ! m_ctrlSliderEdit.SetWindowText( szParserDelay ); ! NotifyParentOfChange(); ! } ! CSAPrefsSubDlg::OnHScroll(nSBCode, nPos, pScrollBar); } Index: CodingPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/CodingPref.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CodingPref.h 25 Nov 2003 15:05:56 -0000 1.4 --- CodingPref.h 26 Feb 2004 08:44:16 -0000 1.5 *************** *** 11,15 **** // CCodingPref dialog #include "SAPrefsSubDlg.h" - #include "RegProfile.h" --- 11,14 ---- *************** *** 19,42 **** public: CCodingPref(CWnd* pParent = NULL); // standard constructor ! virtual void OnOK(); ! virtual void OnCancel(); protected: // Dialog Data //{{AFX_DATA(CCodingPref) ! enum { IDD = IDD_PREF_CODE }; ! CEdit m_sliderVal; ! CSliderCtrl m_slider; ! BOOL m_matchBrace; ! BOOL m_highlightLine; ! CButton m_tabKey; ! CButton m_spaceKey; ! BOOL m_codeCompletion; ! BOOL m_autoCompletion; ! BOOL m_enableClassView; ! BOOL m_alphabetic; ! //}}AFX_DATA ! protected: ! CRegProfile m_reg; // Overrides --- 18,38 ---- public: CCodingPref(CWnd* pParent = NULL); // standard constructor ! SaveChanges(); protected: // Dialog Data //{{AFX_DATA(CCodingPref) ! enum { IDD = IDD_PREF_CODE }; ! CSliderCtrl m_ctrlSlider; ! CEdit m_ctrlSliderEdit; ! BOOL m_bAutoComp; ! BOOL m_bBraceMatch; ! BOOL m_bClassView; ! BOOL m_bCodeComp; ! BOOL m_bCVSorted; ! BOOL m_bHighlightLine; ! BOOL m_bSyntaxHighlighting; ! int m_iAutoCompKey; ! //}}AFX_DATA // Overrides *************** *** 47,50 **** --- 43,47 ---- //}}AFX_VIRTUAL + // Implementation protected: *************** *** 53,61 **** //{{AFX_MSG(CCodingPref) virtual BOOL OnInitDialog(); ! afx_msg void OnReleasedcaptureSlider2(NMHDR* pNMHDR, LRESULT* pResult); ! afx_msg void OnCustomdrawSlider2(NMHDR* pNMHDR, LRESULT* pResult); ! afx_msg void OnDestroy(); ! afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; --- 50,56 ---- //{{AFX_MSG(CCodingPref) virtual BOOL OnInitDialog(); ! afx_msg void OnControlChanged(); ! afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Index: ColorPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ColorPref.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ColorPref.h 21 Feb 2004 12:14:05 -0000 1.4 --- ColorPref.h 26 Feb 2004 08:44:16 -0000 1.5 *************** *** 20,23 **** --- 20,24 ---- CColorPref(CWnd* pParent = NULL); // standard constructor + protected: // Dialog Data //{{AFX_DATA(CColorPref) Index: EditorPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/EditorPref.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EditorPref.h 21 Feb 2004 12:14:05 -0000 1.6 --- EditorPref.h 26 Feb 2004 08:44:16 -0000 1.7 *************** *** 17,23 **** public: CEditorPref(CWnd* pParent = NULL); // standard constructor - public: BOOL SaveChanges(); // Dialog Data //{{AFX_DATA(CEditorPref) --- 17,23 ---- public: CEditorPref(CWnd* pParent = NULL); // standard constructor BOOL SaveChanges(); + protected: // Dialog Data //{{AFX_DATA(CEditorPref) *************** *** 39,43 **** //}}AFX_DATA - protected: // Overrides --- 39,42 ---- Index: FontPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FontPref.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FontPref.h 21 Feb 2004 12:14:05 -0000 1.6 --- FontPref.h 26 Feb 2004 08:44:16 -0000 1.7 *************** *** 18,21 **** --- 18,22 ---- CFontPref(CWnd* pParent = NULL); // standard constructor + protected: // Dialog Data //{{AFX_DATA(CFontPref) Index: SAPrefsDialog.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsDialog.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SAPrefsDialog.cpp 21 Feb 2004 12:14:05 -0000 1.5 --- SAPrefsDialog.cpp 26 Feb 2004 08:44:16 -0000 1.6 *************** *** 71,74 **** --- 71,75 ---- m_pColorPref = NULL; m_pFontPref = NULL; + m_pCodingPref = NULL; } *************** *** 79,82 **** --- 80,84 ---- // Remove allocated dialog objects if( NULL != m_pEditorPref ) delete [] m_pEditorPref; + if( NULL != m_pCodingPref ) delete [] m_pCodingPref; if( NULL != m_pColorPref ) delete [] m_pColorPref; if( NULL != m_pFontPref ) delete [] m_pFontPref; *************** *** 177,186 **** // CGeneralPref dlgGeneral; - // EditorPref dlgEditor; - // CFontPref dlgFont; - // CColorPref dlgColor; // CToolPref dlgTool; // CAssociationPref dlgAssoc; - // CCodingPref dlgCoding; // CLangPref dlgLang; // CTemplatePref dlgTemplate; --- 179,184 ---- *************** *** 200,203 **** --- 198,203 ---- m_pEditorPref = new CEditorPref[iNrOfLanguages]; if( NULL == m_pEditorPref ) return FALSE; + m_pCodingPref = new CCodingPref[iNrOfLanguages]; + if( NULL == m_pCodingPref ) return FALSE; m_pColorPref = new CColorPref[iNrOfLanguages]; if( NULL == m_pColorPref ) return FALSE; *************** *** 212,215 **** --- 212,217 ---- AddPage( m_pEditorPref[iCount], pConfigFile->GetLanguageName( iCount ), &dlgLang ); m_pEditorPref[iCount].SetSyntaxFile( pSyntaxFile ); + AddPage( m_pCodingPref[iCount], "Code", &m_pEditorPref[iCount] ); + m_pCodingPref[iCount].SetSyntaxFile( pSyntaxFile ); AddPage( m_pColorPref[iCount], "Color", &m_pEditorPref[iCount] ); m_pColorPref[iCount].SetSyntaxFile( pSyntaxFile ); *************** *** 221,225 **** AddPage(dlgTemplate,"Language Tools"); AddPage(dlgExtDir,"Folders & Extensions"); - AddPage(dlgCoding,"Coding Preferences"); AddPage(dlgAssoc,"File Associations"); --- 223,226 ---- *************** *** 560,563 **** --- 561,565 ---- { bChanged |= m_pEditorPref[iCount].SaveChanges(); + bChanged |= m_pCodingPref[iCount].SaveChanges(); bChanged |= m_pColorPref[iCount].SaveChanges(); bChanged |= m_pFontPref[iCount].SaveChanges(); Index: SAPrefsDialog.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsDialog.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SAPrefsDialog.h 21 Feb 2004 12:14:05 -0000 1.5 --- SAPrefsDialog.h 26 Feb 2004 08:44:16 -0000 1.6 *************** *** 58,62 **** CSAPrefsSubDlg *pDlgParent; CString csCaption; ! int iLanguageNr; }; --- 58,62 ---- CSAPrefsSubDlg *pDlgParent; CString csCaption; ! // int iLanguageNr; }; *************** *** 170,176 **** CColorPref* m_pColorPref; CFontPref* m_pFontPref; CToolPref dlgTool; CAssociationPref dlgAssoc; - CCodingPref dlgCoding; CTemplatePref dlgTemplate; CDirextPref dlgExtDir; --- 170,176 ---- CColorPref* m_pColorPref; CFontPref* m_pFontPref; + CCodingPref* m_pCodingPref; CToolPref dlgTool; CAssociationPref dlgAssoc; CTemplatePref dlgTemplate; CDirextPref dlgExtDir; Index: SyntaxFile.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SyntaxFile.cpp 22 Feb 2004 10:19:17 -0000 1.4 --- SyntaxFile.cpp 26 Feb 2004 08:44:16 -0000 1.5 *************** *** 41,44 **** --- 41,86 ---- } + // Gets a BOOL value of element from section. + BOOL CSyntaxFile::GetBoolFromXMLFile( const TCHAR* section, const TCHAR* element ) + { + return GetIntFromXMLFile( section, element ) ? TRUE : FALSE; + } + + // Sets a BOOL value of element from section to bValue. + BOOL CSyntaxFile::SetBoolToXMLFile( const TCHAR* section, const TCHAR* element, BOOL bValue ) + { + return SetIntToXMLFile( section, element, bValue ? 1 : 0 ); + } + + // Get an int value of element from section. + int CSyntaxFile::GetIntFromXMLFile( const TCHAR* section, const TCHAR* element ) + { + xml_node xnode; + + xnode = xparser.document().first_element_by_name( section ); + if( xnode.empty() && !xnode.children() ) return false; + + xnode = xnode.first_element_by_name( element ); + if( xnode.empty() && !xnode.children() ) return false; + + return atoi( xnode.child(0).value() ); + } + + // Sets an int value of element from section to iValue. + BOOL CSyntaxFile::SetIntToXMLFile( const TCHAR* section, const TCHAR* element, int iValue ) + { + xml_node xnode; + char szValue[5]; + + xnode = xparser.document().first_element_by_name( section ); + if( xnode.empty() && !xnode.children() ) return false; + + xnode = xnode.first_element_by_name( element ); + if( xnode.empty() && !xnode.children() ) return false; + + sprintf( szValue, "%i", iValue ); + return xnode.child(0).value( szValue ); + } + // Function to actually parse the synfile and the ability to check // if all goes well. *************** *** 254,325 **** } - // Returns if SyntaxHighlighting is on. - BOOL CSyntaxFile::GetSyntaxHighlighting() - { - xml_node xnode; - - xnode = xparser.document().first_element_by_name( TAG_VIEW ); - if( xnode.empty() && !xnode.children() ) return false; - - xnode = xnode.first_element_by_name( TAG_VIEW_SYNTAXHIGHLIGHTING ); - if( xnode.empty() && !xnode.children() ) return false; - - return atoi( xnode.child(0).value() ) ? TRUE : FALSE; - } - - // Sets the SyntaxHighlighting to true or false. - BOOL CSyntaxFile::SetSyntaxHighlighting( BOOL bSyntaxHighlighting ) - { - xml_node xnode; - - xnode = xparser.document().first_element_by_name( TAG_VIEW ); - if( xnode.empty() && !xnode.children() ) return false; - - xnode = xnode.first_element_by_name( TAG_VIEW_SYNTAXHIGHLIGHTING ); - if( xnode.empty() && !xnode.children() ) return false; - - return xnode.child(0).value( bSyntaxHighlighting ? "1" : "0" ); - } - - // Returns if the CurrentLine must be highlighted. - BOOL CSyntaxFile::GetHighlightCurrentLine() - { - xml_node xnode; - - xnode = xparser.document().first_element_by_name( TAG_VIEW ); - if( xnode.empty() && !xnode.children() ) return false; - - xnode = xnode.first_element_by_name( TAG_VIEW_HIGHLIGHTCURRENTLINE ); - if( xnode.empty() && !xnode.children() ) return false; - - return atoi( xnode.child(0).value() ) ? TRUE : FALSE; - } - - // Sets CurrentLine Highlighting. - BOOL CSyntaxFile::SetHighlightCurrentLine( BOOL bHighlightCurrentLine ) - { - xml_node xnode; - - xnode = xparser.document().first_element_by_name( TAG_VIEW ); - if( xnode.empty() && !xnode.children() ) return false; - - xnode = xnode.first_element_by_name( TAG_VIEW_HIGHLIGHTCURRENTLINE ); - if( xnode.empty() && !xnode.children() ) return false; - - return xnode.child(0).value( bHighlightCurrentLine ? "1" : "0" ); - } - // Returns if the WhiteSpace should be visible. BOOL CSyntaxFile::GetWhiteSpace() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_WHITESPACE ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } --- 296,303 ---- } // Returns if the WhiteSpace should be visible. BOOL CSyntaxFile::GetWhiteSpace() { ! return GetBoolFromXMLFile( TAG_VIEW, TAG_VIEW_WHITESPACE ); } *************** *** 327,339 **** BOOL CSyntaxFile::SetWhiteSpace( BOOL bWhiteSpace ) { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_WHITESPACE ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bWhiteSpace ? "1" : "0" ); } --- 305,309 ---- BOOL CSyntaxFile::SetWhiteSpace( BOOL bWhiteSpace ) { ! return SetBoolToXMLFile( TAG_VIEW, TAG_VIEW_WHITESPACE, bWhiteSpace ); } *************** *** 341,353 **** BOOL CSyntaxFile::GetEOL() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_EOL ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } --- 311,315 ---- BOOL CSyntaxFile::GetEOL() { ! return GetBoolFromXMLFile( TAG_VIEW, TAG_VIEW_EOL ); } *************** *** 355,367 **** BOOL CSyntaxFile::SetEOL( BOOL bEOL ) { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_EOL ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bEOL ? "1" : "0" ); } --- 317,321 ---- BOOL CSyntaxFile::SetEOL( BOOL bEOL ) { ! return SetBoolToXMLFile( TAG_VIEW, TAG_VIEW_EOL, bEOL ); } *************** *** 369,396 **** BOOL CSyntaxFile::GetWordWrap() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_WORDWRAP ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } - // Sets WordWrap to true or false. BOOL CSyntaxFile::SetWordWrap( BOOL bWordWrap ) { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_WORDWRAP ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bWordWrap ? "1" : "0" ); } --- 323,333 ---- BOOL CSyntaxFile::GetWordWrap() { ! return GetBoolFromXMLFile( TAG_VIEW, TAG_VIEW_WORDWRAP ); } // Sets WordWrap to true or false. BOOL CSyntaxFile::SetWordWrap( BOOL bWordWrap ) { ! return SetBoolToXMLFile( TAG_VIEW, TAG_VIEW_WORDWRAP, bWordWrap ); } *************** *** 399,411 **** int CSyntaxFile::GetTabWidth() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_TABWIDTH ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ); } --- 336,340 ---- int CSyntaxFile::GetTabWidth() { ! return GetIntFromXMLFile( TAG_VIEW, TAG_VIEW_TABWIDTH ); } *************** *** 413,427 **** BOOL CSyntaxFile::SetTabWidth( int iTabWidth ) { ! xml_node xnode; ! char szTabWidth[5]; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_TABWIDTH ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! sprintf( szTabWidth, "%i", iTabWidth ); ! return xnode.child(0).value( szTabWidth ); } --- 342,346 ---- BOOL CSyntaxFile::SetTabWidth( int iTabWidth ) { ! return SetIntToXMLFile( TAG_VIEW, TAG_VIEW_TABWIDTH, iTabWidth ); } *************** *** 429,441 **** BOOL CSyntaxFile::GetTabsToSpaces() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_TABSTOSPACES ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } --- 348,352 ---- BOOL CSyntaxFile::GetTabsToSpaces() { ! return GetBoolFromXMLFile( TAG_VIEW, TAG_VIEW_TABSTOSPACES ); } *************** *** 443,630 **** BOOL CSyntaxFile::SetTabsToSpaces( BOOL bTabsToSpaces ) { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_VIEW_TABSTOSPACES ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bTabsToSpaces ? "1" : "0" ); } ! // Returns if the Indent is on. ! BOOL CSyntaxFile::GetIndent() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } ! // Set the Indent to true or false. ! BOOL CSyntaxFile::SetIndent( BOOL bIndent ) { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bIndent ? "1" : "0" ); } ! // Gets the IndentSize ! int CSyntaxFile::GetIndentSize() { ! xml_node xnode; - xnode = xparser.document().first_element_by_name( TAG_INDENT ); - if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENTSIZE ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ); } ! // Sets the IndentSize to iIndentSize. ! BOOL CSyntaxFile::SetIndentSize( int iIndentSize ) { ! xml_node xnode; ! char szIndentSize[5]; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENTSIZE ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! sprintf( szIndentSize, "%i", iIndentSize ); ! return xnode.child(0).value( szIndentSize ); } ! // Get the AutoIndent value ! int CSyntaxFile::GetAutoIndent() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_AUTOINDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ); } ! // Sets the AutoIndent value ! BOOL CSyntaxFile::SetAutoIndent( int iAutoIndent ) { ! xml_node xnode; ! char szAutoIndent[5]; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_AUTOINDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! sprintf( szAutoIndent, "%i", iAutoIndent ); ! return xnode.child(0).value( szAutoIndent); } ! // Gets if the IndentGuides are on. ! BOOL CSyntaxFile::GetIndentGuides() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENTGUIDES ); ! if( xnode.empty() && !xnode.children() ) return false; ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } ! // Sets the IndentGuides on or off. ! BOOL CSyntaxFile::SetIndentGuides( BOOL bIndentGuides ) { ! xml_node xnode; ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENTGUIDES ); ! if( xnode.empty() && !xnode.children() ) return false; ! return xnode.child(0).value( bIndentGuides ? "1" : "0" ); } ! // Returns if the RightEdge is on. ! int CSyntaxFile::GetRightEdge() { ! xml_node xnode; ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_VIEW_RIGHTEDGE ); ! if( xnode.empty() && !xnode.children() ) return false; ! return atoi( xnode.child(0).value() ); } ! // Set the RightEdge to true or false. ! BOOL CSyntaxFile::SetRightEdge( BOOL bRightEdge ) { ! xml_node xnode; ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_VIEW_RIGHTEDGE ); ! if( xnode.empty() && !xnode.children() ) return false; ! return xnode.child(0).value( bRightEdge ? "1" : "0" ); } ! // Gets the RightEdgeColumn ! int CSyntaxFile::GetRightEdgeColumn() { ! xml_node xnode; ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_VIEW_RIGHTEDGECOLUMN ); ! if( xnode.empty() && !xnode.children() ) return false; ! return atoi( xnode.child(0).value() ); } ! // Sets the RightEdgeColumn to iREColumn. ! BOOL CSyntaxFile::SetRightEdgeColumn( int iREColumn ) { ! xml_node xnode; ! char szREColumn[5]; ! xnode = xparser.document().first_element_by_name( TAG_VIEW ); ! if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_VIEW_RIGHTEDGECOLUMN ); ! if( xnode.empty() && !xnode.children() ) return false; ! sprintf( szREColumn, "%i", iREColumn ); ! return xnode.child(0).value( szREColumn ); } --- 354,539 ---- BOOL CSyntaxFile::SetTabsToSpaces( BOOL bTabsToSpaces ) { ! return SetBoolToXMLFile( TAG_VIEW, TAG_VIEW_TABSTOSPACES, bTabsToSpaces ); } ! // Returns if the RightEdge is on. ! BOOL CSyntaxFile::GetRightEdge() { ! return GetBoolFromXMLFile( TAG_VIEW, TAG_VIEW_RIGHTEDGE ); } ! // Set the RightEdge to true or false. ! BOOL CSyntaxFile::SetRightEdge( BOOL bRightEdge ) { ! return SetBoolToXMLFile( TAG_VIEW, TAG_VIEW_RIGHTEDGE, bRightEdge ); } ! // Gets the RightEdgeColumn ! int CSyntaxFile::GetRightEdgeColumn() { ! return GetIntFromXMLFile( TAG_VIEW, TAG_VIEW_RIGHTEDGECOLUMN ); ! } ! // Sets the RightEdgeColumn to iREColumn. ! BOOL CSyntaxFile::SetRightEdgeColumn( int iREColumn ) ! { ! return SetIntToXMLFile( TAG_VIEW, TAG_VIEW_RIGHTEDGECOLUMN, iREColumn ); } ! // Returns if SyntaxHighlighting is on. ! BOOL CSyntaxFile::GetSyntaxHighlighting() { ! return GetBoolFromXMLFile( TAG_CODE, TAG_CODE_SYNTAXHIGHLIGHTING ); } ! // Sets the SyntaxHighlighting to true or false. ! BOOL CSyntaxFile::SetSyntaxHighlighting( BOOL bSyntaxHighlighting ) { ! return SetBoolToXMLFile( TAG_CODE, TAG_CODE_SYNTAXHIGHLIGHTING, bSyntaxHighlighting ); } ! // Returns if the CurrentLine must be highlighted. ! BOOL CSyntaxFile::GetHighlightCurrentLine() { ! return GetBoolFromXMLFile( TAG_CODE, TAG_CODE_HIGHLIGHTCURRENTLINE ); } ! // Sets CurrentLine Highlighting. ! BOOL CSyntaxFile::SetHighlightCurrentLine( BOOL bHighlightCurrentLine ) { ! return SetBoolToXMLFile( TAG_CODE, TAG_CODE_HIGHLIGHTCURRENTLINE, bHighlightCurrentLine ); ! } ! // Get Brace Matching ! BOOL CSyntaxFile::GetBraceMatch() ! { ! return GetBoolFromXMLFile( TAG_CODE, TAG_CODE_BRACEMATCHING ); } ! // Sets Brace Matching. ! BOOL CSyntaxFile::SetBraceMatch( BOOL bBraceMatch ) { ! return SetBoolToXMLFile( TAG_CODE, TAG_CODE_BRACEMATCHING, bBraceMatch ); ! } ! // Is Auto Completion enabled? ! BOOL CSyntaxFile::GetAutoCompletion() ! { ! return GetBoolFromXMLFile( TAG_AUTOCOMP, TAG_AUTOCOMP_AUTOCOMPLETION ); ! } ! // Enables or disables Auto Completion. ! BOOL CSyntaxFile::SetAutoCompletion( BOOL bAutoComp ) ! { ! return SetBoolToXMLFile( TAG_AUTOCOMP, TAG_AUTOCOMP_AUTOCOMPLETION, bAutoComp ); ! } ! // Is Code Completion enabled? ! BOOL CSyntaxFile::GetCodeCompletion() ! { ! return GetBoolFromXMLFile( TAG_AUTOCOMP, TAG_AUTOCOMP_CODECOMPLETION ); } ! // Enables or disables Code Completion. ! BOOL CSyntaxFile::SetCodeCompletion( BOOL bCodeComp ) { ! return SetBoolToXMLFile( TAG_AUTOCOMP, TAG_AUTOCOMP_CODECOMPLETION, bCodeComp ); ! } ! // Get the Auto Completion Key. ! int CSyntaxFile::GetACKey() ! { ! return GetIntFromXMLFile( TAG_AUTOCOMP, TAG_AUTOCOMP_AUTOCOMPKEY ); ! } ! // Sets the Auto Completion Key. ! BOOL CSyntaxFile::SetACKey( int iKey ) ! { ! return SetIntToXMLFile( TAG_AUTOCOMP, TAG_AUTOCOMP_AUTOCOMPKEY, iKey ); ! } ! // Is the Class View enabled? ! BOOL CSyntaxFile::GetClassView() ! { ! return GetBoolFromXMLFile( TAG_CLASSVIEW, TAG_CLASSVIEW_CLASSVIEWON ); } ! // Enable or Disable the Class View. ! BOOL CSyntaxFile::SetClassView( BOOL bClassView ) { ! return SetBoolToXMLFile( TAG_CLASSVIEW, TAG_CLASSVIEW_CLASSVIEWON, bClassView ); ! } ! // Returns if the Class View should be sorted. ! BOOL CSyntaxFile::GetSortClassView() ! { ! return GetBoolFromXMLFile( TAG_CLASSVIEW, TAG_CLASSVIEW_SORT ); ! } ! // Set if the Class View should be sorted. ! BOOL CSyntaxFile::SetSortClassView( BOOL bSortClassView ) ! { ! return SetBoolToXMLFile( TAG_CLASSVIEW, TAG_CLASSVIEW_SORT, bSortClassView ); ! } ! // Returns the Class View Parser Delay time. ! int CSyntaxFile::GetParserDelay() ! { ! return GetIntFromXMLFile( TAG_CLASSVIEW, TAG_CLASSVIEW_PARSEDELAY ); } ! // Sets the Class View Parser Delay time. ! BOOL CSyntaxFile::SetParserDelay( int iParserDelay ) { ! return SetIntToXMLFile( TAG_CLASSVIEW, TAG_CLASSVIEW_PARSEDELAY, iParserDelay ); ! } ! // Returns if the Indent is on. ! BOOL CSyntaxFile::GetIndent() ! { ! return GetBoolFromXMLFile( TAG_INDENT, TAG_INDENT_INDENT ); ! } ! // Set the Indent to true or false. ! BOOL CSyntaxFile::SetIndent( BOOL bIndent ) ! { ! return SetBoolToXMLFile( TAG_INDENT, TAG_INDENT_INDENT, bIndent ); ! } ! // Gets the IndentSize ! int CSyntaxFile::GetIndentSize() ! { ! return GetIntFromXMLFile( TAG_INDENT, TAG_INDENT_INDENTSIZE ); } + // Sets the IndentSize to iIndentSize. + BOOL CSyntaxFile::SetIndentSize( int iIndentSize ) + { + return SetIntToXMLFile( TAG_INDENT, TAG_INDENT_INDENTSIZE, iIndentSize ); + } ! // Get the AutoIndent value ! int CSyntaxFile::GetAutoIndent() { ! return GetIntFromXMLFile( TAG_INDENT, TAG_INDENT_AUTOINDENT ); ! } ! // Sets the AutoIndent value ! BOOL CSyntaxFile::SetAutoIndent( int iAutoIndent ) ! { ! return SetIntToXMLFile( TAG_INDENT, TAG_INDENT_AUTOINDENT, iAutoIndent ); ! } ! // Gets if the IndentGuides are on. ! BOOL CSyntaxFile::GetIndentGuides() ! { ! return GetBoolFromXMLFile( TAG_INDENT, TAG_INDENT_INDENTGUIDES ); ! } ! // Sets the IndentGuides on or off. ! BOOL CSyntaxFile::SetIndentGuides( BOOL bIndentGuides ) ! { ! return SetBoolToXMLFile( TAG_INDENT, TAG_INDENT_INDENTGUIDES, bIndentGuides ); } *************** *** 632,644 **** BOOL CSyntaxFile::GetMarginLineNumber() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_MARGINS ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_MARGINS_LINENUMBERS ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } --- 541,545 ---- BOOL CSyntaxFile::GetMarginLineNumber() { ! return GetBoolFromXMLFile( TAG_MARGINS, TAG_MARGINS_LINENUMBERS ); } *************** *** 646,658 **** BOOL CSyntaxFile::SetMarginLineNumber( BOOL bLineNumbers ) { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_MARGINS ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_MARGINS_LINENUMBERS ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bLineNumbers ? "1" : "0" ); } --- 547,551 ---- BOOL CSyntaxFile::SetMarginLineNumber( BOOL bLineNumbers ) { ! return SetBoolToXMLFile( TAG_MARGINS, TAG_MARGINS_LINENUMBERS, bLineNumbers ); } *************** *** 660,672 **** BOOL CSyntaxFile::GetMarginBookmark() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_MARGINS ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_MARGINS_BOOKMARK ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } --- 553,557 ---- BOOL CSyntaxFile::GetMarginBookmark() { ! return GetBoolFromXMLFile( TAG_MARGINS, TAG_MARGINS_BOOKMARK ); } *************** *** 674,686 **** BOOL CSyntaxFile::SetMarginBookmark( BOOL bBookmark ) { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_MARGINS ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_MARGINS_BOOKMARK ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bBookmark? "1" : "0" ); } --- 559,563 ---- BOOL CSyntaxFile::SetMarginBookmark( BOOL bBookmark ) { ! return SetBoolToXMLFile( TAG_MARGINS, TAG_MARGINS_BOOKMARK, bBookmark ); } *************** *** 688,700 **** BOOL CSyntaxFile::GetMarginFold() { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_MARGINS ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_MARGINS_FOLD ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; } --- 565,569 ---- BOOL CSyntaxFile::GetMarginFold() { ! return GetBoolFromXMLFile( TAG_MARGINS, TAG_MARGINS_FOLD ); } *************** *** 702,714 **** BOOL CSyntaxFile::SetMarginFold( BOOL bFold ) { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_MARGINS ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_MARGINS_FOLD ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bFold ? "1" : "0" ); } --- 571,575 ---- BOOL CSyntaxFile::SetMarginFold( BOOL bFold ) { ! return SetBoolToXMLFile( TAG_MARGINS, TAG_MARGINS_FOLD, bFold ); } Index: SyntaxFile.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SyntaxFile.h 22 Feb 2004 10:19:17 -0000 1.4 --- SyntaxFile.h 26 Feb 2004 08:44:16 -0000 1.5 *************** *** 25,28 **** --- 25,31 ---- #define TAG_KEYWORDS "Keywords" #define TAG_VIEW "View" + #define TAG_CODE "CodeHighlight" + #define TAG_AUTOCOMP "AutoComp" + #define TAG_CLASSVIEW "ClassView" #define TAG_INDENT "Indent" #define TAG_MARGINS "Margins" *************** *** 44,49 **** // View sub tags - #define TAG_VIEW_SYNTAXHIGHLIGHTING "SyntaxHighlighting" - #define TAG_VIEW_HIGHLIGHTCURRENTLINE "HighlightCurrentLine" #define TAG_VIEW_WHITESPACE "WhiteSpace" #define TAG_VIEW_EOL "EOL" --- 47,50 ---- *************** *** 54,57 **** --- 55,73 ---- #define TAG_VIEW_RIGHTEDGECOLUMN "RightEdgeColumn" + // Code Highlighting sub tags + #define TAG_CODE_SYNTAXHIGHLIGHTING "SyntaxHighlighting" + #define TAG_CODE_HIGHLIGHTCURRENTLINE "HighlightCurrentLine" + #define TAG_CODE_BRACEMATCHING "BraceMatching" + + // Auto Completion sub tags + #define TAG_AUTOCOMP_AUTOCOMPLETION "AutoCompletion" + #define TAG_AUTOCOMP_CODECOMPLETION "CodeCompletion" + #define TAG_AUTOCOMP_AUTOCOMPKEY "AutoCompKey" + + // Class View sub tags + #define TAG_CLASSVIEW_CLASSVIEWON "ClassViewOn" + #define TAG_CLASSVIEW_SORT "SortClasView" + #define TAG_CLASSVIEW_PARSEDELAY "ParserDelay" + // Indentation sub tags #define TAG_INDENT_INDENT "Indent" *************** *** 92,95 **** --- 108,123 ---- CSortedArray<CString, CString> Keywords[KEYWORDSET_MAX]; + // Gets a BOOL value of element from section. + BOOL GetBoolFromXMLFile( const TCHAR* section, const TCHAR* element ); + + // Sets a BOOL value of element from section to bValue. + BOOL SetBoolToXMLFile( const TCHAR* section, const TCHAR* element, BOOL bValue ); + + // Get an int value of element from section. + int GetIntFromXMLFile( const TCHAR* section, const TCHAR* element ); + + // Sets an int value of element from section to iValue. + BOOL SetIntToXMLFile( const TCHAR* section, const TCHAR* element, int iValue ); + // Converts a char array with hex chars to an int. int RGBHexValueToColorInt( const TCHAR* value ); *************** *** 133,148 **** CString GetDelimitedKeywords( char cSep = ' ' ); - // Returns if SyntaxHighlighting is on. - BOOL GetSyntaxHighlighting(); - - // Sets the SyntaxHighlighting to true or false. - BOOL SetSyntaxHighlighting( BOOL bSyntaxHighlighting ); - - // Returns if the CurrentLine must be Highlighted. - BOOL GetHighlightCurrentLine(); - - // Sets CurrentLine Highlighting. - BOOL SetHighlightCurrentLine( BOOL bHighlightCurrentLine ); - // Returns if the WhiteSpace should be visible. BOOL GetWhiteSpace(); --- 161,164 ---- *************** *** 175,178 **** --- 191,260 ---- BOOL SetTabsToSpaces( BOOL bUseTabs ); + // Get the RightEdge type. + BOOL GetRightEdge(); + + // Set the RightEdge to true or false. + BOOL SetRightEdge( BOOL bRightEdge ); + + // Gets the RightEdgeColumn + int GetRightEdgeColumn(); + + // Sets the RightEdgeColumn to iREColumn. + BOOL SetRightEdgeColumn( int iREColumn ); + + // Returns if SyntaxHighlighting is on. + BOOL GetSyntaxHighlighting(); + + // Sets the SyntaxHighlighting to true or false. + BOOL SetSyntaxHighlighting( BOOL bSyntaxHighlighting ); + + // Returns if the CurrentLine must be Highlighted. + BOOL GetHighlightCurrentLine(); + + // Sets CurrentLine Highlighting. + BOOL SetHighlightCurrentLine( BOOL bHighlightCurrentLine ); + + // Get Brace Matching + BOOL GetBraceMatch(); + + // Sets Brace Matching. + BOOL SetBraceMatch( BOOL bBraceMatch ); + + // Is Auto Completion enabled? + BOOL GetAutoCompletion(); + + // Enables or disables Auto Completion. + BOOL SetAutoCompletion( BOOL bAutoComp ); + + // Is Code Completion enabled? + BOOL GetCodeCompletion(); + + // Enables or disables Code Completion. + BOOL SetCodeCompletion( BOOL bCodeComp ); + + // Get the Auto Completion Key. + int GetACKey(); + + // Sets the Auto Completion Key. + BOOL SetACKey( int iKey ); + + // Is the Class View enabled? + BOOL GetClassView(); + + // Enable or Disable the Class View. + BOOL SetClassView( BOOL bClassView ); + + // Returns if the Class View should be sorted. + BOOL GetSortClassView(); + + // Set if the Class View should be sorted. + BOOL SetSortClassView( BOOL bSortClassView ); + + // Returns the Class View Parser Delay time. + int GetParserDelay(); + + // Sets the Class View Parser Delay time. + BOOL SetParserDelay( int iParserDelay ); + // Returns if Indent is on. int GetIndent(); *************** *** 199,214 **** BOOL SetIndentGuides( BOOL bIndentGuides ); - // Get the RightEdge type. - int GetRightEdge(); - - // Set the RightEdge to true or false. - BOOL SetRightEdge( BOOL bRightEdge ); - - // Gets the RightEdgeColumn - int GetRightEdgeColumn(); - - // Sets the RightEdgeColumn to iREColumn. - BOOL SetRightEdgeColumn( int iREColumn ); - // Returns if the LineNumber margin is on. BOOL GetMarginLineNumber(); --- 281,284 ---- Index: resource.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/resource.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** resource.h 21 Feb 2004 12:14:05 -0000 1.20 --- resource.h 26 Feb 2004 08:44:16 -0000 1.21 *************** *** 126,129 **** --- 126,130 ---- #define IDC_CHECK8 1008 #define IDC_CHECK_WHITESPACE 1008 + #define IDC_CHECK_HIGHLIGHTLINE 1008 #define IDC_CAPTION_BAR 1009 #define IDC_CHECK9 1009 *************** *** 174,179 **** --- 175,182 ---- #define IDC_BUTTON4 1063 #define IDC_SLIDER2 1065 + #define IDC_SLIDER_CVPARSEDELAY 1065 #define IDC_RADIO6 1066 #define IDC_RADIO7 1067 + #define IDC_RADIO_CVF2 1067 #define IDC_CREDIT 1068 #define IDC_VER 1072 *************** *** 213,216 **** --- 216,228 ---- #define IDC_RADIO_AUTOINDENT3 1106 #define IDC_RADIO_AUTOINDENT2 1107 + #define IDC_CHECK_SYNTAXHIGHLIGHTING 1108 + #define IDC_CHECK_AUTOCOMP 1111 + #define IDC_CHECK_CODECOMP 1112 + #define IDC_CHECK_CLASSVIEW 1113 + #define IDC_RADIO_ACKEY1 1114 + #define IDC_RADIO_ACKEY2 1115 + #define IDC_CHECK_CVSORTALPH 1116 + #define IDC_CHECK_BRACEMATCH 1117 + #define IDC_EDIT_CVPARSERDELAY 1118 #define stc32 0x045f #define IDC_OUTLOOK_BAR_PLACEHOLDER 1432 *************** *** 498,502 **** #define _APS_NEXT_RESOURCE_VALUE 252 #define _APS_NEXT_COMMAND_VALUE 33075 ! #define _APS_NEXT_CONTROL_VALUE 1108 #define _APS_NEXT_SYMED_VALUE 105 #endif --- 510,514 ---- #define _APS_NEXT_RESOURCE_VALUE 252 #define _APS_NEXT_COMMAND_VALUE 33075 ! #define _APS_NEXT_CONTROL_VALUE 1119 #define _APS_NEXT_SYMED_VALUE 105 #endif Index: scintillaif.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/scintillaif.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** scintillaif.cpp 22 Feb 2004 10:19:17 -0000 1.12 --- scintillaif.cpp 26 Feb 2004 08:44:16 -0000 1.13 *************** *** 2109,2110 **** --- 2109,2123 ---- } + // AnyEdit + + // Get's the AutoIndent value. + BOOL CScintilla::GetAutoIndent() + { + return bAutoIndent; + } + + // Set's the AutoIndent value. + void CScintilla::SetAutoIndent( BOOL bIndent ) + { + bAutoIndent = bIndent; + } Index: scintillaif.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/scintillaif.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** scintillaif.h 22 Feb 2004 10:19:17 -0000 1.10 --- scintillaif.h 26 Feb 2004 08:44:16 -0000 1.11 *************** *** 70,73 **** --- 70,93 ---- class CScintilla : public CWnd { + protected: + // Locally Written CScintilla members. + + BOOL bAutoIndent; + + //! Handle of the loaded scilexer.dll + static HMODULE scidll; + //! Reference counter. + static int refs; + + //! Handle of the relevant scintilla window. + HWND hWnd; + //! Used for Scintilla's GetDirectPointer + void *m_Pointer; + //! Function pointer to Scintilla window message pump. + scmsgfn Perform; + + //! Is text modified? + BOOL m_Modified; + //! Locally used method to get a range of text. public: *************** *** 78,84 **** ~CScintilla(); - BOOL autoindent; - - CWnd * SetFocus() { --- 98,101 ---- *************** *** 86,90 **** } - /// Create a Scintilla window inside parent hParent. HWND Create(HWND hParent, HINSTANCE hInst); --- 103,106 ---- *************** *** 140,165 **** void FoldAll(); - protected: - - // Locally Written CScintilla members. - - //! Handle of the loaded scilexer.dll - static HMODULE scidll; - //! Reference counter. - static int refs; - - //! Handle of the relevant scintilla window. - HWND hWnd; - //! Used for Scintilla's GetDirectPointer - void *m_Pointer; - //! Function pointer to Scintilla window message pump. - scmsgfn Perform; - - //! Is text modified? - BOOL m_Modified; - //! Locally used method to get a range of text. - // Python Wrapper-Generator Generated header... - public: void SetDirectFunctionAndPointer(); void SetDirectPointer(); --- 156,160 ---- *************** *** 219,230 **** * Redoes the next action on the undo history */ ! void Redo ! (); /** * Choose between collecting actions into the undo * history and discarding them. */ ! void SetUndoCollection(BOOL collectUndo ! ); /** * Select all the text in the document. --- 214,223 ---- * Redoes the next action on the undo history */ ! void Redo(); /** * Choose between collecting actions into the undo * history and discarding them. */ ! void SetUndoCollection(BOOL collectUndo); /** * Select all the text in the document. *************** *** 1561,1566 **** afx_msg void OnKillFocus(CWnd* pNewWnd); //}}AFX_MSG ! } ! ; /** --- 1554,1566 ---- afx... [truncated message content] |
From: <moo...@us...> - 2004-02-24 19:28:57
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29443 Modified Files: AnyEditView.cpp Log Message: AutoIndent change, update and fix - Changed Auto Indent to work a little different, but better. - Added Auto Indent after ':' - Fixed problem with different EOL characters. Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** AnyEditView.cpp 23 Feb 2004 14:30:59 -0000 1.45 --- AnyEditView.cpp 24 Feb 2004 19:22:17 -0000 1.46 *************** *** 412,435 **** case SCN_CHARADDED: ! if( scn->ch == '\r' && m_Scintilla.autoindent >= 1 ) ! { ! // Set the indetation of the new line the same as the previous line. ! SetLineIndentation( m_Scintilla.GetCurLineNumber(), m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ) ); ! } ! if( scn->ch == '{' && m_Scintilla.autoindent >= 2 ) { int iIndentation; ! // First add an EOL character. ! if( m_Scintilla.GetEOLMode() == SC_EOL_CRLF ) m_Scintilla.AddText( 2, "\r\n" ); ! else if( m_Scintilla.GetEOLMode() == SC_EOL_CR ) m_Scintilla.AddText( 1, "\r" ); ! else if( m_Scintilla.GetEOLMode() == SC_EOL_LF ) m_Scintilla.AddText( 1, "\n" ); ! // Get old indentation iIndentation = m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ); ! // If indent == 0 then we add the tab width ! if( m_Scintilla.GetIndent() == 0 ) iIndentation += m_Scintilla.GetTabWidth(); ! else iIndentation += m_Scintilla.GetIndent(); ! // Set the indentation of the new line. ! m_Scintilla.SetLineIndentation( m_Scintilla.GetCurLineNumber(), iIndentation ); ! m_Scintilla.SetSel( -1, m_Scintilla.GetLineIndentPosition( m_Scintilla.GetCurLineNumber() ) ); } if( scn->ch == '}' && m_Scintilla.autoindent >= 2 ) --- 412,442 ---- case SCN_CHARADDED: ! if( ( scn->ch == '\r' || scn->ch == '\n' ) && m_Scintilla.autoindent >= 1 ) { + int pos; int iIndentation; ! ! // If we have EOLMode CRLF, then we AutoIndented on '\r' so we don't do it again on '\n' ! if( m_Scintilla.GetEOLMode() == SC_EOL_CRLF && scn->ch == '\n' ) break; ! ! // Let's get the indentation of the previous line. iIndentation = m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ); ! // May we do extra indentation? ! if( m_Scintilla.autoindent >= 2 ) ! { ! // Get the position before the EOL characters ! pos = m_Scintilla.GetCurrentPos() - 2; ! // If EOLMode is CRLF we go another step back. ! if( m_Scintilla.GetEOLMode() == SC_EOL_CRLF ) -- pos; ! // Do we have a '{' of ':' ! if( m_Scintilla.GetCharAt( pos ) == '{' || m_Scintilla.GetCharAt( pos ) == ':' ) ! { ! // Add an extra indent to the current line. ! if( m_Scintilla.GetIndent() == 0 ) iIndentation += m_Scintilla.GetTabWidth(); ! else iIndentation += m_Scintilla.GetIndent(); ! } ! } ! // Set the indetation of the new line to the calculated indentation ! SetLineIndentation( m_Scintilla.GetCurLineNumber(), iIndentation ); } if( scn->ch == '}' && m_Scintilla.autoindent >= 2 ) *************** *** 445,455 **** // Set the new indentation m_Scintilla.SetLineIndentation( m_Scintilla.GetCurLineNumber(), iIndentation ); - // Now add an EOL to move to the next line. - if( m_Scintilla.GetEOLMode() == SC_EOL_CRLF ) m_Scintilla.AddText( 2, "\r\n" ); - else if( m_Scintilla.GetEOLMode() == SC_EOL_CR ) m_Scintilla.AddText( 1, "\r" ); - else if( m_Scintilla.GetEOLMode() == SC_EOL_LF ) m_Scintilla.AddText( 1, "\n" ); - // Set the indentation of the new line the same as the previous line. - m_Scintilla.SetLineIndentation( m_Scintilla.GetCurLineNumber(), m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ) ); - m_Scintilla.SetSel( -1, m_Scintilla.GetLineIndentPosition( m_Scintilla.GetCurLineNumber() ) ); } break; --- 452,455 ---- |
From: <moo...@us...> - 2004-02-23 14:44:42
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27549 Modified Files: AnyEditView.cpp AnyEditView.h ChangeLog.txt Log Message: AutoIndent on Braces added. - The AutoIndent follow Language Scoping option now AutoIndents on Braces. Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** AnyEditView.cpp 23 Feb 2004 14:24:40 -0000 1.44 --- AnyEditView.cpp 23 Feb 2004 14:30:59 -0000 1.45 *************** *** 412,418 **** case SCN_CHARADDED: ! if(m_Scintilla.autoindent) ! if(scn->ch == '\r') ! AutoIndent(scn->ch); break; case SCN_MACRORECORD: --- 412,456 ---- case SCN_CHARADDED: ! if( scn->ch == '\r' && m_Scintilla.autoindent >= 1 ) ! { ! // Set the indetation of the new line the same as the previous line. ! SetLineIndentation( m_Scintilla.GetCurLineNumber(), m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ) ); ! } ! if( scn->ch == '{' && m_Scintilla.autoindent >= 2 ) ! { ! int iIndentation; ! // First add an EOL character. ! if( m_Scintilla.GetEOLMode() == SC_EOL_CRLF ) m_Scintilla.AddText( 2, "\r\n" ); ! else if( m_Scintilla.GetEOLMode() == SC_EOL_CR ) m_Scintilla.AddText( 1, "\r" ); ! else if( m_Scintilla.GetEOLMode() == SC_EOL_LF ) m_Scintilla.AddText( 1, "\n" ); ! // Get old indentation ! iIndentation = m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ); ! // If indent == 0 then we add the tab width ! if( m_Scintilla.GetIndent() == 0 ) iIndentation += m_Scintilla.GetTabWidth(); ! else iIndentation += m_Scintilla.GetIndent(); ! // Set the indentation of the new line. ! m_Scintilla.SetLineIndentation( m_Scintilla.GetCurLineNumber(), iIndentation ); ! m_Scintilla.SetSel( -1, m_Scintilla.GetLineIndentPosition( m_Scintilla.GetCurLineNumber() ) ); ! } ! if( scn->ch == '}' && m_Scintilla.autoindent >= 2 ) ! { ! int iIndentation; ! // Get the indentation ! iIndentation = m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() ); ! // Move indentation one indent back ! if( m_Scintilla.GetIndent() == 0 ) iIndentation -= m_Scintilla.GetTabWidth(); ! else iIndentation -= m_Scintilla.GetIndent(); ! // We don't want to go to the previous line. ! if( iIndentation < 0 ) iIndentation = 0; ! // Set the new indentation ! m_Scintilla.SetLineIndentation( m_Scintilla.GetCurLineNumber(), iIndentation ); ! // Now add an EOL to move to the next line. ! if( m_Scintilla.GetEOLMode() == SC_EOL_CRLF ) m_Scintilla.AddText( 2, "\r\n" ); ! else if( m_Scintilla.GetEOLMode() == SC_EOL_CR ) m_Scintilla.AddText( 1, "\r" ); ! else if( m_Scintilla.GetEOLMode() == SC_EOL_LF ) m_Scintilla.AddText( 1, "\n" ); ! // Set the indentation of the new line the same as the previous line. ! m_Scintilla.SetLineIndentation( m_Scintilla.GetCurLineNumber(), m_Scintilla.GetLineIndentation( m_Scintilla.GetCurLineNumber() - 1 ) ); ! m_Scintilla.SetSel( -1, m_Scintilla.GetLineIndentPosition( m_Scintilla.GetCurLineNumber() ) ); ! } break; case SCN_MACRORECORD: *************** *** 1001,1011 **** } - void CAnyEditView::AutoIndent(char a) - { - int oldind = m_Scintilla.GetLineIndentation(m_Scintilla.GetCurLineNumber()-1); - SetLineIndentation(m_Scintilla.GetCurLineNumber(),oldind); - } - - void CAnyEditView::OnViewWordwrap() { --- 1039,1042 ---- Index: AnyEditView.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** AnyEditView.h 23 Feb 2004 14:24:40 -0000 1.25 --- AnyEditView.h 23 Feb 2004 14:30:59 -0000 1.26 *************** *** 85,89 **** void GetWordsNear(LPCSTR sword,int rootlen,CStringArray &wordsNear); void ParseClassView(); - void AutoIndent(char a); void SetLineIndentation(int line,int indent); //{{AFX_MSG(CAnyEditView) --- 85,88 ---- Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ChangeLog.txt,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** ChangeLog.txt 23 Feb 2004 14:24:40 -0000 1.37 --- ChangeLog.txt 23 Feb 2004 14:30:59 -0000 1.38 *************** *** 12,15 **** --- 12,16 ---- 7) Fixed Save As, which didn't save the file if it wasn't modified. 8) Rewrite check for modified files outside AE. Also moved it from the View to the Document class. + 9) AutoIndent added when pressing Braces. Enable the AutoIndent follow Language Scoping to use it. Beta 2.0 [Tester's Release 2] |
From: <moo...@us...> - 2004-02-23 14:38:22
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25878 Modified Files: AnyEditDoc.cpp AnyEditDoc.h AnyEditView.cpp AnyEditView.h ChangeLog.txt Log Message: Save As bug fixed and Rewrite check for modified files outside AE. - Save As didn't actually save the file. - Moved modified check from View to Document class. - Smaller modified check code after rewrite. - Little Cleanup of View class. Index: AnyEditDoc.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditDoc.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** AnyEditDoc.cpp 21 Feb 2004 12:14:05 -0000 1.16 --- AnyEditDoc.cpp 23 Feb 2004 14:24:40 -0000 1.17 *************** *** 37,40 **** --- 37,41 ---- bSyntaxHighlighting = TRUE; m_pScintilla = NULL; + LastAccessTime = 0; } *************** *** 110,115 **** BOOL CAnyEditDoc::OnOpenDocument(LPCTSTR lpszPathName) { ! if (!CDocument::OnOpenDocument(lpszPathName)) ! return FALSE; // Set the language number from the extension --- 111,115 ---- BOOL CAnyEditDoc::OnOpenDocument(LPCTSTR lpszPathName) { ! if( !CDocument::OnOpenDocument( lpszPathName ) ) return FALSE; // Set the language number from the extension *************** *** 119,125 **** SetScintillaProperties(); ! // Use scintilla to open the file [12/27/2001 13:51] ! m_pScintilla->OpenFile(lpszPathName); ! doc_file_path = lpszPathName; return TRUE; } --- 119,127 ---- SetScintillaProperties(); ! // Use Scintilla to open the file. ! m_pScintilla->OpenFile( lpszPathName ); ! SetPathName( lpszPathName ); ! SetLastAccessTime(); ! return TRUE; } *************** *** 127,154 **** BOOL CAnyEditDoc::OnSaveDocument(LPCTSTR lpszPathName) { ! if(!this->IsModified()) return TRUE; BOOL saved = m_pScintilla->SaveFile(lpszPathName); if(saved) { HasBeenModified(FALSE); - POSITION pos = GetFirstViewPosition(); - CAnyEditView* pView=NULL; - if(pos != NULL) - { - pView = (CAnyEditView *)GetNextView(pos); - } ! if(doc_file_path != lpszPathName) { ! doc_file_path = lpszPathName; ! SetPathName(lpszPathName); ! pView->JustOpenedFile(); } ! pView->SetAccessTime(); ! } ! return saved; } --- 129,234 ---- BOOL CAnyEditDoc::OnSaveDocument(LPCTSTR lpszPathName) { ! int iTempLanguage; ! ! // Don't save if nothing canged, but do save if we are saving the ! // document with a different name. It also causes a new document ! // that hasn't been modified to be saved. ! if( !IsModified() && GetPathName() == lpszPathName ) return TRUE; ! ! // Save it. BOOL saved = m_pScintilla->SaveFile(lpszPathName); if(saved) { HasBeenModified(FALSE); ! // Check if we need to update the scintilla properties ! iTempLanguage = theApp.GetLanguageNrFromExtension( GetFileNameExtension( lpszPathName ) ); ! if( iLanguage != iTempLanguage ) ! { ! // Save the language nr. ! iLanguage = iTempLanguage; ! // Set FirstTimeProperties true, so we set all properties. ! bFirstTimeProperties = TRUE; ! // Set the Scintilla properties. ! SetScintillaProperties(); ! } ! ! SetPathName( lpszPathName ); ! SetLastAccessTime(); ! } ! ! return saved; ! } ! ! void CAnyEditDoc::SetLastAccessTime() ! { ! if( !theApp.CheckModification() ) return; ! ! CString str = GetPathName(); ! if( !str.IsEmpty() ) ! { ! CFile file; ! CFileStatus status; ! file.GetStatus( str,status ); ! if( status.m_mtime != LastAccessTime ) { ! LastAccessTime = status.m_mtime; } + } ! } ! void CAnyEditDoc::CheckLastAccessTime() ! { ! // First check if we may check the last access time. ! if( theApp.CheckModification() && LastAccessTime != 0 ) ! { ! CString str = GetPathName(); ! if( !str.IsEmpty() ) ! { ! CFile file; ! CFileStatus status; ! if( !file.GetStatus( str, status ) ) ! { ! // Stop checking last access time ! LastAccessTime = 0; ! CString msg = "'"; ! msg+= str; ! msg+= "'\nFile has been deleted outside AnyEdit!\nDo you want to close the window ?"; ! if(AfxMessageBox(msg,MB_YESNO)==IDYES) ! { ! // Close the window ! POSITION pos = GetFirstViewPosition(); ! CAnyEditView* pView=NULL; ! if(pos != NULL) ! { ! pView = (CAnyEditView *)GetNextView(pos); ! } ! pView->GetParentFrame()->PostMessage( WM_CLOSE ); ! } ! } ! else ! { ! if( status.m_mtime != LastAccessTime ) ! { ! LastAccessTime = status.m_mtime; ! CString msg = "'"; ! msg+= str; ! msg+= "'\nFile has been modified outside AnyEdit!\nDo you want to reload it ?"; ! if(AfxMessageBox(msg,MB_YESNO)==IDYES) ! { ! m_pScintilla->SetFocus(); ! m_pScintilla->OpenFile(str); ! } ! else ! { ! m_pScintilla->SetFocus(); ! LastAccessTime = 0; ! } ! } ! } ! } ! } } *************** *** 173,194 **** CString str = GetTitle(); ! if(modified) { ! if(str.GetAt(str.GetLength()-1)!='*') ! SetTitle(GetTitle() + " *" ); SetModifiedFlag(); } else { ! if( (!str.IsEmpty()) && (str.GetAt(str.GetLength()-1)=='*')) { CString ss = GetTitle(); ! SetTitle(ss.Left(ss.GetLength()-2)); } ! SetModifiedFlag(FALSE); } - //This cause memory to increase drasctically but why ???? - //theApp.UpdateMditabs(); - } --- 253,273 ---- CString str = GetTitle(); ! if( modified ) { ! if( str.GetAt( str.GetLength() - 1 ) != '*' ) ! { ! SetTitle( GetTitle() + " *" ); ! } SetModifiedFlag(); } else { ! if( !str.IsEmpty() && str.GetAt( str.GetLength() - 1 ) == '*' ) { CString ss = GetTitle(); ! SetTitle( ss.Left( ss.GetLength() - 2 ) ); } ! SetModifiedFlag( FALSE ); } } Index: AnyEditDoc.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditDoc.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AnyEditDoc.h 12 Dec 2003 11:00:04 -0000 1.8 --- AnyEditDoc.h 23 Feb 2004 14:24:40 -0000 1.9 *************** *** 34,39 **** CScintilla * m_pScintilla; ! CString doc_file_path; CLanguage * m_pDocLang; // Operations public: --- 34,41 ---- CScintilla * m_pScintilla; ! CString szDocumentFilePath; CLanguage * m_pDocLang; + CTime LastAccessTime; + // Operations public: *************** *** 65,69 **** BOOL GetSyntaxHighlighting(); void ToggleSyntaxHighlighting(); ! virtual ~CAnyEditDoc(); #ifdef _DEBUG --- 67,71 ---- BOOL GetSyntaxHighlighting(); void ToggleSyntaxHighlighting(); ! void CheckLastAccessTime(); virtual ~CAnyEditDoc(); #ifdef _DEBUG *************** *** 74,77 **** --- 76,80 ---- protected: CString GetFileNameExtension( LPCTSTR lpszPathName ); + void SetLastAccessTime(); // Generated message map functions Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** AnyEditView.cpp 22 Feb 2004 10:19:17 -0000 1.43 --- AnyEditView.cpp 23 Feb 2004 14:24:40 -0000 1.44 *************** *** 150,154 **** outoffocus = FALSE; isHighlightingOn = TRUE; - fileclosed=FALSE; } --- 150,153 ---- *************** *** 190,194 **** } ! //! // Before we start printing, we are going to calculate the offsets // of each page we are going to print. --- 189,193 ---- } ! // // Before we start printing, we are going to calculate the offsets // of each page we are going to print. *************** *** 335,340 **** m_Scintilla.ShowWindow(SW_SHOW); - // Init(); - CAnyEditDoc* pDoc = GetDocument(); pDoc->SetDocScintilla(&m_Scintilla); --- 334,337 ---- *************** *** 378,404 **** } - - - - //Scintilla init - - /*void CAnyEditView::Init() - { - - theApp.SetDefaults(&m_Scintilla); - - m_Scintilla.SetIndentationGuides(TRUE); - //m_Scintilla.SetBufferedDraw(FALSE); - m_Scintilla.IndicSetStyle(0,INDIC_SQUIGGLE); - m_Scintilla.IndicSetStyle(1,INDIC_TT); - m_Scintilla.IndicSetStyle(2,INDIC_DIAGONAL); - // m_Scintilla.UsePopUp(false); - m_Scintilla.autoindent = TRUE; - m_Scintilla.DefineMarker(BOOKMARK,BOOKMARK,RGB(0,0,255),RGB(231,231,255)); - m_Scintilla.DefineMarker(SELLINE,SELLINE,RGB(107,27,18),RGB(251,252,226)); - //m_Scintilla.DefineMarker(BOOKMARK1,SC_MARK_CHARACTER+49,RGB(255,255,255),RGB(74,87,149)); - } - */ - BOOL CAnyEditView::OnEraseBkgnd(CDC* pDC) { --- 375,378 ---- *************** *** 423,427 **** case SCN_SAVEPOINTREACHED: case SCN_SAVEPOINTLEFT: ! OnModified(); break; --- 397,401 ---- case SCN_SAVEPOINTREACHED: case SCN_SAVEPOINTLEFT: ! GetDocument()->HasBeenModified( m_Scintilla.GetModified() ); break; *************** *** 465,469 **** } - //return CView::OnNotify(wParam,lParam,pResult); return retbool; } --- 439,442 ---- *************** *** 528,533 **** { // TODO: Add your command update UI handler code here ! pCmdUI->Enable(m_Scintilla.CanUndo ! ()); } --- 501,505 ---- { // TODO: Add your command update UI handler code here ! pCmdUI->Enable(m_Scintilla.CanUndo()); } *************** *** 652,661 **** } - - void CAnyEditView::OnModified() - { - GetDocument()->HasBeenModified(m_Scintilla.GetModified()); - } - void CAnyEditView::SetSelectedLine(int lineno) { --- 624,627 ---- *************** *** 769,810 **** } - - /*void CAnyEditView::ReloadDefaults() - { - theApp.SetDefaults(&m_Scintilla); - }*/ - - void CAnyEditView::JustOpenedFile() - { - - CString docname = GetDocument()->GetPathName(); - if(!docname.IsEmpty()) - { - CurDocPath = docname; - docname = msc.GetFileExtension(docname); - DocExt = docname; - CLanguage * m_pLanguage = NULL; - CString tst = theApp.SetScintillaLanguage(docname,&m_Scintilla); - m_pLanguage = theApp.GetLanguage(docname); - if(m_pLanguage!=NULL) - { - GetDocument()->SetDocLanguage(m_pLanguage); - } - docname = theApp.GetCompFilePathFromLang(tst); - SetAccessTime(); - } - - if(m_reg.GetProfileInt(_T("Preferences"),_T("EnableClassView"),1)==1) - { - EnableParsing = TRUE; - SetTimer(PARSER_TIMER,ParseTimeLimit,NULL); - } - - } - void CAnyEditView::OnInitialUpdate() { CView::OnInitialUpdate(); ! JustOpenedFile(); //Check for previously saved document position and restore if any --- 735,745 ---- } void CAnyEditView::OnInitialUpdate() { CView::OnInitialUpdate(); ! ! // TODO: This must be settable from config or syntax file. ! EnableParsing = TRUE; ! SetTimer(PARSER_TIMER,ParseTimeLimit,NULL); //Check for previously saved document position and restore if any *************** *** 861,865 **** } - // int pstartline = m_Scintilla.LineFromPosition(); CFindDialog fnd(NULL,&m_Scintilla,&stext); int i = fnd.DoModal(); --- 796,799 ---- *************** *** 1113,1117 **** } - long initial_pos = m_Scintilla.GetCurrentPos(); long final_pos=0; --- 1047,1050 ---- *************** *** 1148,1152 **** { str+= strtoadd; - //str+= "\n"; } --- 1081,1084 ---- *************** *** 1184,1188 **** m_Scintilla.SetFocus(); - } --- 1116,1119 ---- *************** *** 1254,1354 **** } - void CAnyEditView::SetAccessTime() - { - if(!theApp.CheckModification()) - return; - - CString str = GetDocument()->GetPathName(); - if(!str.IsEmpty()) - { - CFile file; - CFileStatus status; - file.GetStatus(str,status); - if(status.m_mtime != last_access_time) - { - last_access_time = status.m_mtime; - } - } - - } - void CAnyEditView::OnSetFocus(CWnd* pOldWnd) { ! CView::OnSetFocus(pOldWnd); m_Scintilla.SetFocus(); ! if(theApp.CheckModification()) ! { ! if(last_access_time==NULL) ! { ! last_access_time = 1; ! } ! else ! { ! ! CString str = GetDocument()->GetPathName(); ! if(!str.IsEmpty()) ! { ! CFile file; ! CFileStatus status; ! if(!file.GetStatus(str,status)) ! { ! if(fileclosed) return; ! //Find out how to close a view from inside the view ! ! CString msg = "'"; ! msg+= str; ! msg+= "'\nFile has been deleted outside AnyEdit!\nDo you want to close the window ?"; ! theApp.SetModification(FALSE); ! if(CurDocPath.IsEmpty()) return; ! if(AfxMessageBox(msg,MB_YESNO)==IDYES) ! { ! if(this) ! { ! fileclosed=TRUE; ! last_access_time = NULL; ! theApp.SetModification(TRUE); ! //delete this; ! this->GetParentFrame()->PostMessage(WM_CLOSE); ! return; ! } ! } ! else ! { ! last_access_time = NULL; ! theApp.SetModification(TRUE); ! } ! ! } ! else ! { ! if(status.m_mtime != last_access_time) ! { ! last_access_time = status.m_mtime; ! CString msg = "'"; ! msg+= str; ! msg+= "'\nFile has been modified outside AnyEdit!\nDo you want to reload it ?"; ! theApp.SetModification(FALSE); ! if(AfxMessageBox(msg,MB_YESNO)==IDYES) ! { ! m_Scintilla.SetFocus(); ! m_Scintilla.OpenFile(str); ! } ! else ! { ! m_Scintilla.SetFocus(); ! last_access_time = NULL; ! } ! theApp.SetModification(TRUE); ! ! } ! } ! ! } ! ! } ! ! } CString prevpath = theApp.GetCurDocPath(); if(prevpath.Compare(CurDocPath)==0) --- 1185,1197 ---- } void CAnyEditView::OnSetFocus(CWnd* pOldWnd) { ! CView::OnSetFocus( pOldWnd ); m_Scintilla.SetFocus(); ! // Check the last access time to know if the file was changed outside of AnyEdit. ! GetDocument()->CheckLastAccessTime(); + // TODO: This may need to be cleaned up, check it. CString prevpath = theApp.GetCurDocPath(); if(prevpath.Compare(CurDocPath)==0) *************** *** 1785,1789 **** } - void CAnyEditView::OnEditCodecompletelist() { --- 1628,1631 ---- Index: AnyEditView.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** AnyEditView.h 19 Feb 2004 07:39:34 -0000 1.24 --- AnyEditView.h 23 Feb 2004 14:24:40 -0000 1.25 *************** *** 31,36 **** CString CurDocPath; BOOL outoffocus; - CTime last_access_time; - BOOL fileclosed; CToolBar m_wndTool; --- 31,34 ---- *************** *** 39,43 **** public: CAnyEditDoc* GetDocument(); - // void Init(); protected: --- 37,40 ---- *************** *** 74,84 **** CString GetInputValues(LPCSTR curline); void InsertStringArray(CStringArray &arr); - void JustOpenedFile(); - // void ReloadDefaults(); void SetSelectedLine(int lineno); - void OnModified(); void HandleNotification(LPARAM lParam); LPCSTR GetCurrentExtension(); - void SetAccessTime(); virtual ~CAnyEditView(); #ifdef _DEBUG --- 71,77 ---- Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ChangeLog.txt,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ChangeLog.txt 21 Feb 2004 12:14:05 -0000 1.36 --- ChangeLog.txt 23 Feb 2004 14:24:40 -0000 1.37 *************** *** 9,14 **** 4) Preferences changes - Color/Font and Apply button addition 5) Simple document Print Support [#713838] ! 6) Preferences changes - Document (Editor) Options (margins, tabs, indent, whitespace) ! Beta 2.0 [Tester's Release 2] --- 9,15 ---- 4) Preferences changes - Color/Font and Apply button addition 5) Simple document Print Support [#713838] ! 6) Preferences changes - Document (Editor) Options (margins, tabs, indent, whitespace) [#782376,#787902] ! 7) Fixed Save As, which didn't save the file if it wasn't modified. ! 8) Rewrite check for modified files outside AE. Also moved it from the View to the Document class. Beta 2.0 [Tester's Release 2] |
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17187 Modified Files: AnyEditView.cpp SciLexer.h Scintilla.h StdAfx.h SyntaxFile.cpp SyntaxFile.h scintillaif.cpp scintillaif.h Log Message: Scintilla update to version 1.59 with TabIndents patch. - Minor changes to where the files are included. Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** AnyEditView.cpp 19 Feb 2004 07:39:34 -0000 1.42 --- AnyEditView.cpp 22 Feb 2004 10:19:17 -0000 1.43 *************** *** 7,11 **** #include "AnyEditDoc.h" #include "AnyEditView.h" - #include "scilexer.h" #include "FindDialog.h" #include "FindReplace.h" --- 7,10 ---- *************** *** 14,20 **** #include "SyntaxFile.h" - #include "Platform.h" - #include "Scintilla.h" - #ifdef _DEBUG #define new DEBUG_NEW --- 13,16 ---- *************** *** 280,284 **** // Print a page. ! m_Scintilla.FormatRange( true, (long)&frPrint); } --- 276,280 ---- // Print a page. ! m_Scintilla.FormatRange( true, (long)&frPrint); } Index: SciLexer.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SciLexer.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SciLexer.h 18 Feb 2004 04:43:27 -0000 1.5 --- SciLexer.h 22 Feb 2004 10:19:17 -0000 1.6 *************** *** 70,73 **** --- 70,75 ---- #define SCLEX_ERLANG 53 #define SCLEX_OCTAVE 54 + #define SCLEX_MSSQL 55 + #define SCLEX_VERILOG 56 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 *************** *** 258,261 **** --- 260,265 ---- #define SCE_B_KEYWORD3 11 #define SCE_B_KEYWORD4 12 + #define SCE_B_CONSTANT 13 + #define SCE_B_ASM 14 #define SCE_PROPS_DEFAULT 0 #define SCE_PROPS_COMMENT 1 *************** *** 557,560 **** --- 561,565 ---- #define SCE_NSIS_MACRODEF 12 #define SCE_NSIS_STRINGVAR 13 + #define SCE_NSIS_NUMBER 14 #define SCE_MMIXAL_LEADWS 0 #define SCE_MMIXAL_COMMENT 1 *************** *** 634,637 **** --- 639,670 ---- #define SCE_ERLANG_NODE_NAME 13 #define SCE_ERLANG_UNKNOWN 31 + #define SCE_MSSQL_DEFAULT 0 + #define SCE_MSSQL_COMMENT 1 + #define SCE_MSSQL_LINE_COMMENT 2 + #define SCE_MSSQL_NUMBER 3 + #define SCE_MSSQL_STRING 4 + #define SCE_MSSQL_OPERATOR 5 + #define SCE_MSSQL_IDENTIFIER 6 + #define SCE_MSSQL_VARIABLE 7 + #define SCE_MSSQL_COLUMN_NAME 8 + #define SCE_MSSQL_STATEMENT 9 + #define SCE_MSSQL_DATATYPE 10 + #define SCE_MSSQL_SYSTABLE 11 + #define SCE_MSSQL_GLOBAL_VARIABLE 12 + #define SCE_MSSQL_FUNCTION 13 + #define SCE_V_DEFAULT 0 + #define SCE_V_COMMENT 1 + #define SCE_V_COMMENTLINE 2 + #define SCE_V_COMMENTLINEBANG 3 + #define SCE_V_NUMBER 4 + #define SCE_V_WORD 5 + #define SCE_V_STRING 6 + #define SCE_V_WORD2 7 + #define SCE_V_WORD3 8 + #define SCE_V_PREPROCESSOR 9 + #define SCE_V_OPERATOR 10 + #define SCE_V_IDENTIFIER 11 + #define SCE_V_STRINGEOL 12 + #define SCE_V_USER 19 //--Autogenerated -- end of section automatically generated from Scintilla.iface Index: Scintilla.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Scintilla.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Scintilla.h 18 Feb 2004 04:43:27 -0000 1.8 --- Scintilla.h 22 Feb 2004 10:19:17 -0000 1.9 *************** *** 571,574 **** --- 571,575 ---- #define SCI_SETCHARSDEFAULT 2444 #define SCI_AUTOCGETCURRENT 2445 + #define SCI_ALLOCATE 2446 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 Index: StdAfx.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/StdAfx.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** StdAfx.h 19 Feb 2004 07:39:34 -0000 1.5 --- StdAfx.h 22 Feb 2004 10:19:17 -0000 1.6 *************** *** 32,37 **** #define PUGAPI_VERSION_MINOR 2 //The Pug XML library minor version we are using in this implementation. ! // Scintilla Printing stuff #include "Platform.h" //{{AFX_INSERT_LOCATION}} --- 32,39 ---- #define PUGAPI_VERSION_MINOR 2 //The Pug XML library minor version we are using in this implementation. ! // Scintilla #include "Platform.h" + #include "Scintilla.h" + #include "SciLexer.h" //{{AFX_INSERT_LOCATION}} Index: SyntaxFile.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SyntaxFile.cpp 21 Feb 2004 12:14:05 -0000 1.3 --- SyntaxFile.cpp 22 Feb 2004 10:19:17 -0000 1.4 *************** *** 214,217 **** --- 214,221 ---- if( name == "SCLEX_POWERBASIC" ) return SCLEX_POWERBASIC; if( name == "SCLEX_FORTH" ) return SCLEX_FORTH; + if( name == "SCLEX_ERLANG" ) return SCLEX_ERLANG; + if( name == "SCLEX_OCTAVE" ) return SCLEX_OCTAVE; + if( name == "SCLEX_MSSQL" ) return SCLEX_MSSQL; + if( name == "SCLEX_VERILOG" ) return SCLEX_VERILOG; return -1; Index: SyntaxFile.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SyntaxFile.h 21 Feb 2004 12:14:05 -0000 1.3 --- SyntaxFile.h 22 Feb 2004 10:19:17 -0000 1.4 *************** *** 11,16 **** // STYLE_MAX ! #include "Scintilla.h" ! #include "SciLexer.h" #include "SortedArray.h" #include "pugxml.h" --- 11,15 ---- // STYLE_MAX ! #include "stdafx.h" #include "SortedArray.h" #include "pugxml.h" *************** *** 86,90 **** ! class CSyntaxFile { protected: --- 85,89 ---- ! class CSyntaxFile { protected: *************** *** 114,118 **** // Set the filename of the syntax file to parse or save. void SetFilename( CString szFileName ); ! // Function to actually parse the synfile and the ability to check // if all goes well. --- 113,117 ---- // Set the filename of the syntax file to parse or save. void SetFilename( CString szFileName ); ! // Function to actually parse the synfile and the ability to check // if all goes well. Index: scintillaif.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/scintillaif.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** scintillaif.cpp 19 Feb 2004 07:39:34 -0000 1.11 --- scintillaif.cpp 22 Feb 2004 10:19:17 -0000 1.12 *************** *** 1,5 **** #include "stdafx.h" #include "scintillaif.h" - #include "scilexer.h" // Initialise no Scintilla dll on startup... --- 1,4 ---- *************** *** 132,136 **** if(mymacro->message == SCI_REPLACESEL) SPerform(mymacro->message,mymacro->wParam,(LPARAM)mymacro->replacesel); ! else SPerform(mymacro->message,mymacro->wParam,mymacro->lParam); mymacro = mymacro->next; --- 131,135 ---- if(mymacro->message == SCI_REPLACESEL) SPerform(mymacro->message,mymacro->wParam,(LPARAM)mymacro->replacesel); ! else SPerform(mymacro->message,mymacro->wParam,mymacro->lParam); mymacro = mymacro->next; *************** *** 185,189 **** /** ! * Call SetFoldingMargins to have CScintilla automatically set up * the folding margin indicators in one of several given styles. The * function also enables folding by setting the fold and fold.compact --- 184,188 ---- /** ! * Call SetFoldingMargins to have CScintilla automatically set up * the folding margin indicators in one of several given styles. The * function also enables folding by setting the fold and fold.compact Index: scintillaif.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/scintillaif.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** scintillaif.h 19 Feb 2004 07:39:34 -0000 1.9 --- scintillaif.h 22 Feb 2004 10:19:17 -0000 1.10 *************** *** 3,7 **** #include "stdafx.h" - #include "scintilla.h" //! Block size for disk reading and writing. --- 3,6 ---- |
From: <moo...@us...> - 2004-02-22 10:30:41
|
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16939 Modified Files: SciLexer.dll Log Message: Scintilla update to version 1.59 with TabIndents patch. Index: SciLexer.dll =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/SciLexer.dll,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsjslQot and /tmp/cvsenvhpK differ |
From: <moo...@us...> - 2004-02-21 12:26:10
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6420 Modified Files: AnyEdit.rc AnyEditDoc.cpp ChangeLog.txt ColorPref.cpp ColorPref.h EditorPref.cpp EditorPref.h FontPref.cpp FontPref.h SAPrefsDialog.cpp SAPrefsDialog.h SAPrefsSubDlg.cpp SAPrefsSubDlg.h SyntaxFile.cpp SyntaxFile.h resource.h Log Message: Preferences Update - Default Editor settings per language. - EditorPref class name changed to CEditorPref - Redesign of the Editor Dialog - SAPrefsSubDlg added SetSyntaxFile, SaveChanges and NotifyParentOfChange - Return status of SaveChanges, to help avoid unnecessary file I/O - SyntaxFile extra functions for new settings. Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** AnyEdit.rc 18 Feb 2004 07:12:24 -0000 1.31 --- AnyEdit.rc 21 Feb 2004 12:14:05 -0000 1.32 *************** *** 1295,1332 **** FONT 8, "MS Sans Serif" BEGIN ! CONTROL "Color syntax highlighting",IDC_CHECK1,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,7,7,104,15 ! CONTROL "View Line Numbers",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,7,23,102,15 ! CONTROL "View Bookmark Margin",IDC_CHECK3,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,7,38,107,15 ! CONTROL "View Fold Margin",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,7,54,93,15 ! CONTROL "View End Of Line",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,7,71,101,15 ! CONTROL "Highlight current line",IDC_CHECK6,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,7,88,94,15 ! CONTROL "Enable Word Wrap",IDC_CHECK7,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,151,7,139,15 ! CONTROL "View Whitespaces",IDC_CHECK8,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,151,22,139,15 ! CONTROL "Allow horizontal splitting",IDC_CHECK9,"Button", ! BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,151,38,139, ! 15 ! CONTROL "Allow vertical splitting",IDC_CHECK10,"Button", ! BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,151,54,139, ! 15 GROUPBOX "Tabs",IDC_STATIC,7,118,137,42 ! LTEXT "Tab Size",IDC_STATIC,13,132,35,11 ! EDITTEXT IDC_EDIT1,53,130,28,12,ES_AUTOHSCROLL | ES_NUMBER ! CONTROL "Convert Tabs to spaces while typing",IDC_CHECK11,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,14,146,126,9 ! CONTROL "Show left margin",IDC_CHECK12,"Button",BS_AUTOCHECKBOX | ! NOT WS_VISIBLE | WS_TABSTOP,151,73,101,9 ! GROUPBOX "Right Margin",IDC_STATIC,147,118,141,42 ! LTEXT "Right Margin Position",IDC_STATIC,156,134,72,12 ! CONTROL "Enable Right Margin Warning",IDC_CHECK13,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,156,145,126,12 ! EDITTEXT IDC_EDIT2,232,130,38,12,ES_AUTOHSCROLL END --- 1295,1338 ---- FONT 8, "MS Sans Serif" BEGIN ! CONTROL "Line Numbers",IDC_CHECK_LINENUMBERS,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,14,14,102,15 ! CONTROL "Bookmark Margin",IDC_CHECK_BOOKMARK,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,14,29,107,15 ! CONTROL "Fold Margin",IDC_CHECK_FOLD,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,14,43,93,15 ! CONTROL "End Of Line",IDC_CHECK_EOL,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,156,43,101,15 ! CONTROL "Word Wrap",IDC_CHECK_WORDWRAP,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,156,14,111,15 ! CONTROL "Whitespace",IDC_CHECK_WHITESPACE,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,156,29,110,15 GROUPBOX "Tabs",IDC_STATIC,7,118,137,42 ! LTEXT "Tab Size",IDC_STATIC,14,132,35,11 ! EDITTEXT IDC_EDIT_TAB,53,130,28,12,ES_AUTOHSCROLL | ES_NUMBER ! CONTROL "Convert Tabs to Spaces while typing", ! IDC_CHECK_TABSTOSPACES,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,14,146,126,9 ! GROUPBOX "Right Edge",IDC_STATIC,147,118,137,42 ! LTEXT "Right Edge Position",IDC_STATIC,156,134,72,12 ! CONTROL "Enable Right Edge Warning",IDC_CHECK_RIGHTEDGE,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,156,145,126,12 ! EDITTEXT IDC_EDIT_RIGHTEDGE,232,130,38,12,ES_AUTOHSCROLL ! GROUPBOX "Indent",IDC_STATIC,7,64,137,52 ! LTEXT "Indent Size",IDC_STATIC,14,76,35,11 ! EDITTEXT IDC_EDIT_INDENT,53,74,28,12,ES_AUTOHSCROLL | ES_NUMBER ! CONTROL "Tab and Backspace (Un)Indent",IDC_CHECK_INDENTS,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,14,90,126,9 ! GROUPBOX "Margins",IDC_STATIC,7,7,137,56 ! GROUPBOX "View",IDC_STATIC,147,7,137,56 ! GROUPBOX "Auto Indentation Style",IDC_STATIC,147,64,137,52, ! WS_GROUP ! CONTROL "Off",IDC_RADIO_AUTOINDENT1,"Button",BS_AUTORADIOBUTTON | ! WS_GROUP,155,75,94,9 ! CONTROL "Follow Previous Line",IDC_RADIO_AUTOINDENT2,"Button", ! BS_AUTORADIOBUTTON,155,86,99,12 ! CONTROL "Follow Language Scoping",IDC_RADIO_AUTOINDENT3,"Button", ! BS_AUTORADIOBUTTON,155,99,101,13 ! CONTROL "Indentation Guides",IDC_CHECK_INDENTSGUIDES,"Button", ! BS_AUTOCHECKBOX | WS_TABSTOP,14,102,126,9 END Index: AnyEditDoc.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditDoc.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AnyEditDoc.cpp 12 Feb 2004 13:05:50 -0000 1.15 --- AnyEditDoc.cpp 21 Feb 2004 12:14:05 -0000 1.16 *************** *** 297,302 **** bSyntaxHighlighting = pSyntaxFile->GetSyntaxHighlighting(); m_pScintilla->SetWrapMode( pSyntaxFile->GetWordWrap() ? 1 : 0 ); ! m_pScintilla->SetUseTabs( pSyntaxFile->GetUseTabs() ); m_pScintilla->SetEdgeMode( pSyntaxFile->GetRightEdge() ); m_pScintilla->SetEdgeColour( RGB( 255, 255, 255 ) ); --- 297,305 ---- bSyntaxHighlighting = pSyntaxFile->GetSyntaxHighlighting(); + m_pScintilla->SetCaretLineVisible( pSyntaxFile->GetHighlightCurrentLine() ? 1 : 0 ); + m_pScintilla->SetViewWS( pSyntaxFile->GetWhiteSpace() ? 1 : 0 ); + m_pScintilla->SetViewEOL( pSyntaxFile->GetEOL() ? 1 : 0 ); m_pScintilla->SetWrapMode( pSyntaxFile->GetWordWrap() ? 1 : 0 ); ! m_pScintilla->SetUseTabs( pSyntaxFile->GetTabsToSpaces() ? false : true ); m_pScintilla->SetEdgeMode( pSyntaxFile->GetRightEdge() ); m_pScintilla->SetEdgeColour( RGB( 255, 255, 255 ) ); *************** *** 308,311 **** --- 311,321 ---- m_pScintilla->SetCaretWidth( 1 ); + // Indentation + m_pScintilla->SetTabIndents( pSyntaxFile->GetIndent() ? 1 : 0 ); + m_pScintilla->SetBackSpaceUnIndents( pSyntaxFile->GetIndent() ? 1 : 0 ); + m_pScintilla->SetIndent( pSyntaxFile->GetIndentSize() ); + m_pScintilla->autoindent = pSyntaxFile->GetAutoIndent(); + m_pScintilla->SetIndentationGuides( pSyntaxFile->GetIndentGuides() ? 1 : 0 ); + // Set margins. // LineNumbers *************** *** 324,332 **** // Taken from AnyEditView::Init, need to be worked out. - m_pScintilla->SetIndentationGuides(TRUE); m_pScintilla->IndicSetStyle(0,INDIC_SQUIGGLE); m_pScintilla->IndicSetStyle(1,INDIC_TT); m_pScintilla->IndicSetStyle(2,INDIC_DIAGONAL); - m_pScintilla->autoindent = TRUE; m_pScintilla->DefineMarker(SC_MARK_ARROW,SC_MARK_ARROW,RGB(0,0,255),RGB(231,231,255)); m_pScintilla->DefineMarker(SC_MARK_SHORTARROW,SC_MARK_SHORTARROW,RGB(107,27,18),RGB(251,252,226)); --- 334,340 ---- *************** *** 384,388 **** } ! bFirstTimeProperties = FALSE; // Done first round and keep is false every other round. } --- 392,396 ---- } ! bFirstTimeProperties = FALSE; // Done first round and keep it false every other round. } Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ChangeLog.txt,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** ChangeLog.txt 18 Feb 2004 04:43:27 -0000 1.35 --- ChangeLog.txt 21 Feb 2004 12:14:05 -0000 1.36 *************** *** 8,12 **** 3) New syntax file implementation 4) Preferences changes - Color/Font and Apply button addition ! --- 8,13 ---- 3) New syntax file implementation 4) Preferences changes - Color/Font and Apply button addition ! 5) Simple document Print Support [#713838] ! 6) Preferences changes - Document (Editor) Options (margins, tabs, indent, whitespace) Index: ColorPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ColorPref.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ColorPref.cpp 18 Feb 2004 04:43:27 -0000 1.5 --- ColorPref.cpp 21 Feb 2004 12:14:05 -0000 1.6 *************** *** 160,164 **** LONG CColorPref::OnColorChange(UINT /*lParam*/, LONG /*wParam*/) { - CWnd* wnd; int iStyleNumber; --- 160,163 ---- *************** *** 173,178 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); return TRUE; --- 172,176 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); return TRUE; *************** *** 201,205 **** int iCount; int iColor; - CWnd* wnd; CString szDefaultFileName; CString szFileName; --- 199,202 ---- *************** *** 257,272 **** iLastSelected = -1; OnChangeColorList(); ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } if( NULL != pSyntaxFile ) delete pSyntaxFile; } ! void CColorPref::SetSyntaxFile( CSyntaxFile* lpSyntaxFile ) ! { ! m_pSyntaxFile = lpSyntaxFile; ! } ! ! void CColorPref::SaveChanges() { // Read all data from the boxes and put it in the SyntaxFile. --- 254,263 ---- iLastSelected = -1; OnChangeColorList(); ! NotifyParentOfChange(); } if( NULL != pSyntaxFile ) delete pSyntaxFile; } ! BOOL CColorPref::SaveChanges() { // Read all data from the boxes and put it in the SyntaxFile. *************** *** 289,291 **** --- 280,284 ---- m_pSyntaxFile->SetStyleColorBackground( iStyleNumber, iColor ); } + + return bChanged; } Index: ColorPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ColorPref.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ColorPref.h 12 Feb 2004 13:05:50 -0000 1.3 --- ColorPref.h 21 Feb 2004 12:14:05 -0000 1.4 *************** *** 12,18 **** #include "SAPrefsSubDlg.h" #include "ColorButton.h" - #include "RegProfile.h" #include "ColorStatic.h" - #include "SyntaxFile.h" class CColorPref : public CSAPrefsSubDlg --- 12,16 ---- *************** *** 30,36 **** CColorButton m_forecbutton; //}}AFX_DATA ! // void saveColors(); protected: - // CRegProfile m_reg; // Overrides // ClassWizard generated virtual function overrides --- 28,33 ---- CColorButton m_forecbutton; //}}AFX_DATA ! protected: // Overrides // ClassWizard generated virtual function overrides *************** *** 41,45 **** // Implementation protected: - CSyntaxFile* m_pSyntaxFile; int iNrOfStyles; int iLastSelected; --- 38,41 ---- *************** *** 50,55 **** public: ! void SetSyntaxFile( CSyntaxFile* lpSyntaxFile ); ! void SaveChanges(); protected: --- 46,50 ---- public: ! BOOL SaveChanges(); protected: Index: EditorPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/EditorPref.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EditorPref.cpp 25 Nov 2003 15:05:56 -0000 1.6 --- EditorPref.cpp 21 Feb 2004 12:14:05 -0000 1.7 *************** *** 24,28 **** **********************************************************************/ ! // EditorPref.cpp : implementation file // --- 24,28 ---- **********************************************************************/ ! // CEditorPref.cpp : implementation file // *************** *** 38,113 **** ///////////////////////////////////////////////////////////////////////////// ! // EditorPref dialog ! EditorPref::EditorPref(CWnd* pParent /*=NULL*/) ! : CSAPrefsSubDlg(EditorPref::IDD, pParent) { ! //{{AFX_DATA_INIT(EditorPref) ! m_check1 = FALSE; ! m_check2 = FALSE; ! m_check3 = FALSE; ! m_check4 = FALSE; ! m_check5 = FALSE; ! m_check6 = FALSE; ! m_tabsize = 4; ! m_check11 = FALSE; ! m_marginpos = 80; ! m_check13 = FALSE; ! m_check7 = FALSE; ! m_whitespace = FALSE; //}}AFX_DATA_INIT } ! void EditorPref::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(EditorPref) ! DDX_Check(pDX, IDC_CHECK1, m_check1); ! DDX_Check(pDX, IDC_CHECK2, m_check2); ! DDX_Check(pDX, IDC_CHECK3, m_check3); ! DDX_Check(pDX, IDC_CHECK4, m_check4); ! DDX_Check(pDX, IDC_CHECK5, m_check5); ! DDX_Check(pDX, IDC_CHECK6, m_check6); ! DDX_Text(pDX, IDC_EDIT1, m_tabsize); ! DDV_MinMaxInt(pDX, m_tabsize, 0, 12); ! DDX_Check(pDX, IDC_CHECK11, m_check11); ! DDX_Text(pDX, IDC_EDIT2, m_marginpos); ! DDV_MinMaxInt(pDX, m_marginpos, 0, 200); ! DDX_Check(pDX, IDC_CHECK13, m_check13); ! DDX_Check(pDX, IDC_CHECK7, m_check7); ! DDX_Check(pDX, IDC_CHECK8, m_whitespace); //}}AFX_DATA_MAP } ! BEGIN_MESSAGE_MAP(EditorPref, CSAPrefsSubDlg) ! //{{AFX_MSG_MAP(EditorPref) ! ON_WM_DESTROY() ! //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// ! // EditorPref message handlers ! BOOL EditorPref::OnInitDialog() { - - m_check1 = m_reg.GetProfileInt(SEC_DEF,DEF_SYNTAXHIGHLIGHT,TRUE); - m_check2 = m_reg.GetProfileInt( SEC_DEF, DEF_VIEW_LINENO, TRUE ); - m_check3 = m_reg.GetProfileInt( SEC_DEF, DEF_VIEW_BOOK , FALSE); - m_check4 = m_reg.GetProfileInt( SEC_DEF, DEF_VIEW_FOLD, TRUE ); - m_check5 = m_reg.GetProfileInt( SEC_DEF, DEF_VIEW_EOL, FALSE); - m_whitespace = m_reg.GetProfileInt( SEC_DEF, DEF_VIEW_WHITESPACE, FALSE); - m_check6 = m_reg.GetProfileInt( SEC_DEF, DEF_VIEW_CURLINE, TRUE ); - m_check11 = m_reg.GetProfileInt( SEC_DEF, DEF_TAB_SPACES, FALSE ); - m_tabsize = m_reg.GetProfileInt( SEC_DEF, KEY_TABSIZE, 4 ); - m_check13 = m_reg.GetProfileInt(SEC_DEF,DEF_ENABLE_MARGIN,0); - m_marginpos = m_reg.GetProfileInt(SEC_DEF, DEF_MARGINSIZE, 80); - m_check7 = m_reg.GetProfileInt(_T("Preferences"),_T("WordWrap"),0); - CSAPrefsSubDlg::OnInitDialog(); ! this->UpdateData(); return TRUE; // return TRUE unless you set the focus to a control --- 38,118 ---- ///////////////////////////////////////////////////////////////////////////// ! // CEditorPref dialog ! CEditorPref::CEditorPref(CWnd* pParent /*=NULL*/) ! : CSAPrefsSubDlg(CEditorPref::IDD, pParent) { ! //{{AFX_DATA_INIT(CEditorPref) ! m_bIndentGuides = FALSE; //}}AFX_DATA_INIT } ! void CEditorPref::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(CEditorPref) ! DDX_Check(pDX, IDC_CHECK_BOOKMARK, m_bMarginBookmark); ! DDX_Check(pDX, IDC_CHECK_FOLD, m_bMarginFold); ! DDX_Check(pDX, IDC_CHECK_EOL, m_bViewEOL); ! DDX_Check(pDX, IDC_CHECK_INDENTS, m_bIndent); ! DDX_Check(pDX, IDC_CHECK_LINENUMBERS, m_bMarginLineNumbers); ! DDX_Check(pDX, IDC_CHECK_RIGHTEDGE, m_bRightEdge); ! DDX_Check(pDX, IDC_CHECK_TABSTOSPACES, m_bTabsToSpaces); ! DDX_Check(pDX, IDC_CHECK_WHITESPACE, m_bViewWhiteSpace); ! DDX_Check(pDX, IDC_CHECK_WORDWRAP, m_bViewWordWrap); ! DDX_Text(pDX, IDC_EDIT_INDENT, m_szIndentSize); ! DDX_Text(pDX, IDC_EDIT_RIGHTEDGE, m_szRightEdgeSize); ! DDX_Text(pDX, IDC_EDIT_TAB, m_szTabSize); ! DDX_Radio(pDX, IDC_RADIO_AUTOINDENT1, m_iAutoIndent); ! DDX_Check(pDX, IDC_CHECK_INDENTSGUIDES, m_bIndentGuides); //}}AFX_DATA_MAP } ! BEGIN_MESSAGE_MAP(CEditorPref, CSAPrefsSubDlg) ! //{{AFX_MSG_MAP(CEditorPref) ! ON_BN_CLICKED(IDC_CHECK_BOOKMARK, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_EOL, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_FOLD, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_INDENTS, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_LINENUMBERS, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_RIGHTEDGE, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_TABSTOSPACES, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_WORDWRAP, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_WHITESPACE, OnControlChanged) ! ON_EN_CHANGE(IDC_EDIT_INDENT, OnControlChanged) ! ON_EN_CHANGE(IDC_EDIT_RIGHTEDGE, OnControlChanged) ! ON_EN_CHANGE(IDC_EDIT_TAB, OnControlChanged) ! ON_BN_CLICKED(IDC_RADIO_AUTOINDENT1, OnControlChanged) ! ON_BN_CLICKED(IDC_RADIO_AUTOINDENT2, OnControlChanged) ! ON_BN_CLICKED(IDC_RADIO_AUTOINDENT3, OnControlChanged) ! ON_BN_CLICKED(IDC_CHECK_INDENTSGUIDES, OnControlChanged) ! //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// ! // CEditorPref message handlers ! BOOL CEditorPref::OnInitDialog() { CSAPrefsSubDlg::OnInitDialog(); ! m_bMarginLineNumbers = m_pSyntaxFile->GetMarginLineNumber(); ! m_bMarginBookmark = m_pSyntaxFile->GetMarginBookmark(); ! m_bMarginFold = m_pSyntaxFile->GetMarginFold(); ! m_bViewWordWrap = m_pSyntaxFile->GetWordWrap(); ! m_bViewEOL = m_pSyntaxFile->GetEOL(); ! m_bViewWhiteSpace = m_pSyntaxFile->GetWhiteSpace(); ! m_bIndent = m_pSyntaxFile->GetIndent(); ! m_szIndentSize.Format( "%i", m_pSyntaxFile->GetIndentSize() ); ! m_iAutoIndent = m_pSyntaxFile->GetAutoIndent(); ! m_bIndentGuides = m_pSyntaxFile->GetIndentGuides(); ! m_szTabSize.Format( "%i", m_pSyntaxFile->GetTabWidth() ); ! m_bTabsToSpaces = m_pSyntaxFile->GetTabsToSpaces(); ! m_bRightEdge = m_pSyntaxFile->GetRightEdge(); ! m_szRightEdgeSize.Format( "%i", m_pSyntaxFile->GetRightEdgeColumn() ); ! ! UpdateData( FALSE ); return TRUE; // return TRUE unless you set the focus to a control *************** *** 115,147 **** } ! void EditorPref::SaveData() ! { ! m_reg.WriteProfileInt( SEC_DEF, DEF_SYNTAXHIGHLIGHT, m_check1); ! m_reg.WriteProfileInt( SEC_DEF, DEF_VIEW_LINENO, m_check2); ! m_reg.WriteProfileInt( SEC_DEF, DEF_VIEW_BOOK, m_check3); ! m_reg.WriteProfileInt( SEC_DEF, DEF_VIEW_FOLD, m_check4); ! m_reg.WriteProfileInt( SEC_DEF, DEF_VIEW_EOL, m_check5); ! m_reg.WriteProfileInt( SEC_DEF, DEF_VIEW_CURLINE, m_check6); ! m_reg.WriteProfileInt( SEC_DEF, DEF_VIEW_WHITESPACE, m_whitespace); ! m_reg.WriteProfileInt( SEC_DEF, DEF_TAB_SPACES, m_check11); ! m_reg.WriteProfileInt( SEC_DEF, KEY_TABSIZE , m_tabsize ); ! m_reg.WriteProfileInt( SEC_DEF, DEF_MARGINSIZE, m_marginpos); ! m_reg.WriteProfileInt( SEC_DEF, DEF_ENABLE_MARGIN, m_check13 ); ! m_reg.WriteProfileInt(_T("Preferences"),_T("WordWrap"),m_check7); ! } ! ! void EditorPref::OnDestroy() { ! CSAPrefsSubDlg::OnDestroy(); ! } ! void EditorPref::OnOK() ! { ! SaveData(); ! CSAPrefsSubDlg::OnOK(); } ! void EditorPref::OnCancel() { ! CSAPrefsSubDlg::OnCancel(); } --- 120,205 ---- } ! BOOL CEditorPref::SaveChanges() { ! // If the dialog hasn't been visible the handle is not valid. ! // But if it wasn't visible nothing has changed. ! if( !m_hWnd ) return false; ! UpdateData(); ! if( m_bMarginLineNumbers != m_pSyntaxFile->GetMarginLineNumber() ) ! { ! m_pSyntaxFile->SetMarginLineNumber( m_bMarginLineNumbers ); ! bChanged = true; ! } ! if( m_bMarginBookmark != m_pSyntaxFile->GetMarginBookmark() ) ! { ! m_pSyntaxFile->SetMarginBookmark( m_bMarginBookmark ); ! bChanged = true; ! } ! if( m_bMarginFold != m_pSyntaxFile->GetMarginFold() ) ! { ! m_pSyntaxFile->SetMarginFold( m_bMarginFold ); ! bChanged = true; ! } ! if( m_bViewWordWrap != m_pSyntaxFile->GetWordWrap() ) ! { ! m_pSyntaxFile->SetWordWrap( m_bViewWordWrap ); ! bChanged = true; ! } ! if( m_bViewEOL != m_pSyntaxFile->GetEOL() ) ! { ! m_pSyntaxFile->SetEOL( m_bViewEOL ); ! bChanged = true; ! } ! if( m_bViewWhiteSpace != m_pSyntaxFile->GetWhiteSpace() ) ! { ! m_pSyntaxFile->SetWhiteSpace( m_bViewWhiteSpace ); ! bChanged = true; ! } ! if( m_bIndent != m_pSyntaxFile->GetIndent() ) ! { ! m_pSyntaxFile->SetIndent( m_bIndent ); ! bChanged = true; ! } ! if( atoi( m_szIndentSize ) != m_pSyntaxFile->GetIndentSize() ) ! { ! m_pSyntaxFile->SetIndentSize( atoi( m_szIndentSize ) ); ! bChanged = true; ! } ! if( atoi( m_szTabSize ) != m_pSyntaxFile->GetTabWidth() ) ! { ! m_pSyntaxFile->SetTabWidth( atoi( m_szTabSize ) ); ! bChanged = true; ! } ! if( m_bTabsToSpaces != m_pSyntaxFile->GetTabsToSpaces() ) ! { ! m_pSyntaxFile->SetTabsToSpaces( m_bTabsToSpaces ); ! bChanged = true; ! } ! if( m_bRightEdge != m_pSyntaxFile->GetRightEdge() ) ! { ! m_pSyntaxFile->SetRightEdge( m_bRightEdge ); ! bChanged = true; ! } ! if( atoi( m_szRightEdgeSize ) != m_pSyntaxFile->GetRightEdgeColumn() ) ! { ! m_pSyntaxFile->SetRightEdgeColumn( atoi( m_szRightEdgeSize ) ); ! bChanged = true; ! } ! if( m_iAutoIndent != m_pSyntaxFile->GetAutoIndent() ) ! { ! m_pSyntaxFile->SetAutoIndent( m_iAutoIndent ); ! bChanged = true; ! } ! if( m_bIndentGuides != m_pSyntaxFile->GetIndentGuides() ) ! { ! m_pSyntaxFile->SetIndentGuides( m_bIndentGuides ); ! bChanged = true; ! } ! return bChanged; } ! void CEditorPref::OnControlChanged() { ! NotifyParentOfChange(); } Index: EditorPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/EditorPref.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EditorPref.h 25 Nov 2003 15:05:56 -0000 1.5 --- EditorPref.h 21 Feb 2004 12:14:05 -0000 1.6 *************** *** 5,50 **** #pragma once #endif // _MSC_VER > 1000 ! // EditorPref.h : header file // - #include "RegProfile.h" - #include "Misc.h" ///////////////////////////////////////////////////////////////////////////// ! // EditorPref dialog #include "SAPrefsSubDlg.h" ! class EditorPref : public CSAPrefsSubDlg { // Construction public: ! EditorPref(CWnd* pParent = NULL); // standard constructor public: ! void SaveData(); ! virtual void OnOK(); ! virtual void OnCancel(); // Dialog Data ! //{{AFX_DATA(EditorPref) enum { IDD = IDD_PREF_EDITOR }; ! BOOL m_check1; ! BOOL m_check2; ! BOOL m_check3; ! BOOL m_check4; ! BOOL m_check5; ! BOOL m_check6; ! int m_tabsize; ! BOOL m_check11; ! int m_marginpos; ! BOOL m_check13; ! BOOL m_check7; ! BOOL m_whitespace; //}}AFX_DATA protected: - CRegProfile m_reg; - CMisc msc; // Overrides // ClassWizard generated virtual function overrides ! //{{AFX_VIRTUAL(EditorPref) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support --- 5,47 ---- #pragma once #endif // _MSC_VER > 1000 ! // CEditorPref.h : header file // ///////////////////////////////////////////////////////////////////////////// ! // CEditorPref dialog #include "SAPrefsSubDlg.h" ! class CEditorPref : public CSAPrefsSubDlg { // Construction public: ! CEditorPref(CWnd* pParent = NULL); // standard constructor public: ! BOOL SaveChanges(); ! // Dialog Data ! //{{AFX_DATA(CEditorPref) enum { IDD = IDD_PREF_EDITOR }; ! BOOL m_bMarginBookmark; ! BOOL m_bMarginFold; ! BOOL m_bViewEOL; ! BOOL m_bIndent; ! BOOL m_bMarginLineNumbers; ! BOOL m_bRightEdge; ! BOOL m_bTabsToSpaces; ! BOOL m_bViewWhiteSpace; ! BOOL m_bViewWordWrap; ! CString m_szIndentSize; ! CString m_szRightEdgeSize; ! CString m_szTabSize; ! int m_iAutoIndent; ! BOOL m_bIndentGuides; //}}AFX_DATA protected: // Overrides // ClassWizard generated virtual function overrides ! //{{AFX_VIRTUAL(CEditorPref) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support *************** *** 55,62 **** // Generated message map functions ! //{{AFX_MSG(EditorPref) virtual BOOL OnInitDialog(); ! afx_msg void OnDestroy(); ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; --- 52,59 ---- // Generated message map functions ! //{{AFX_MSG(CEditorPref) virtual BOOL OnInitDialog(); ! afx_msg void OnControlChanged(); ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Index: FontPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FontPref.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FontPref.cpp 18 Feb 2004 07:12:25 -0000 1.5 --- FontPref.cpp 21 Feb 2004 12:14:05 -0000 1.6 *************** *** 30,34 **** #include "anyedit.h" #include "FontPref.h" - #include "Misc.h" #ifdef _DEBUG --- 30,33 ---- *************** *** 67,73 **** BEGIN_MESSAGE_MAP(CFontPref, CSAPrefsSubDlg) ! //{{AFX_MSG_MAP(CFontPref) ! ON_WM_HELPINFO() ! ON_WM_DESTROY() ON_CBN_SELCHANGE(IDC_COMBO_STYLE, OnSelectChangeComboStyle) ON_EN_CHANGE(IDC_EDIT_FONTNAME, OnChangeEditFontname) --- 66,72 ---- BEGIN_MESSAGE_MAP(CFontPref, CSAPrefsSubDlg) ! //{{AFX_MSG_MAP(CFontPref) ! ON_WM_HELPINFO() ! ON_WM_DESTROY() ON_CBN_SELCHANGE(IDC_COMBO_STYLE, OnSelectChangeComboStyle) ON_EN_CHANGE(IDC_EDIT_FONTNAME, OnChangeEditFontname) *************** *** 191,200 **** } - void CFontPref::SetSyntaxFile( CSyntaxFile* lpSyntaxFile ) - { - m_pSyntaxFile = lpSyntaxFile; - } - - void CFontPref::OnSelectChangeComboStyle() { --- 190,193 ---- *************** *** 222,226 **** void CFontPref::OnChangeEditFontname() { - CWnd* wnd; CString szFontName; CString szListFontName; --- 215,218 ---- *************** *** 250,255 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } } --- 242,246 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); } } *************** *** 259,263 **** void CFontPref::OnChangeEditFontsize() { - CWnd* wnd; CString szFontSize; CString szListFontSize; --- 250,253 ---- *************** *** 287,292 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } } --- 277,281 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); } } *************** *** 296,300 **** void CFontPref::OnSelectChangeListFontname() { - CWnd* wnd; CString szFontName; m_ListFontName.GetText( m_ListFontName.GetCurSel(), szFontName ); --- 285,288 ---- *************** *** 308,313 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } } --- 296,300 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); } } *************** *** 315,319 **** void CFontPref::OnSelectChangeListFontsize() { - CWnd* wnd; CString szFontSize; m_ListFontSize.GetText( m_ListFontSize.GetCurSel(), szFontSize ); --- 302,305 ---- *************** *** 327,332 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } } --- 313,317 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); } } *************** *** 334,339 **** void CFontPref::OnCheckBold() { - CWnd* wnd; - // Get the style number from the combobox and change the bold value in the bold map mapBold.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Bold.GetCheck() ); --- 319,322 ---- *************** *** 343,354 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } void CFontPref::OnCheckItalic() { - CWnd* wnd; - // Get the style number from the combobox and change the italic value in the italic map mapItalic.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Italic.GetCheck() ); --- 326,334 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); } void CFontPref::OnCheckItalic() { // Get the style number from the combobox and change the italic value in the italic map mapItalic.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Italic.GetCheck() ); *************** *** 358,369 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } void CFontPref::OnCheckUnderline() { - CWnd* wnd; - // Get the style number from the combobox and change the underline value in the underline map mapUnderline.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Underline.GetCheck() ); --- 338,346 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); } void CFontPref::OnCheckUnderline() { // Get the style number from the combobox and change the underline value in the underline map mapUnderline.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Underline.GetCheck() ); *************** *** 373,383 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } void CFontPref::OnButtonToAllStyles() { - CWnd* wnd; int iCount; int iStyleNumber; --- 350,358 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); } void CFontPref::OnButtonToAllStyles() { int iCount; int iStyleNumber; *************** *** 413,421 **** // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } ! void CFontPref::SaveChanges() { int iCount; --- 388,395 ---- // Tell the parent something changed, so the apply button can be activated ! NotifyParentOfChange(); } ! BOOL CFontPref::SaveChanges() { int iCount; *************** *** 448,451 **** --- 422,426 ---- m_pSyntaxFile->SetStyleFontUnderline( iStyleNumber, bUnderline ); } + return bChanged; } Index: FontPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FontPref.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FontPref.h 18 Feb 2004 07:12:25 -0000 1.5 --- FontPref.h 21 Feb 2004 12:14:05 -0000 1.6 *************** *** 7,12 **** // FontPref.h : header file // ! #include "SyntaxFile.h" ! #include "RegProfile.h" ///////////////////////////////////////////////////////////////////////////// // CFontPref dialog --- 7,11 ---- // FontPref.h : header file // ! ///////////////////////////////////////////////////////////////////////////// // CFontPref dialog *************** *** 35,41 **** protected: int iNrOfStyles; - CRegProfile m_reg; CFont m_Font; - CSyntaxFile* m_pSyntaxFile; CMap<int,int,CString,CString> mapFontName; CMap<int,int,CString,CString> mapFontSize; --- 34,38 ---- *************** *** 57,62 **** // Implementation public: ! void SetSyntaxFile( CSyntaxFile* lpSyntaxFile ); ! void SaveChanges(); protected: --- 54,58 ---- // Implementation public: ! BOOL SaveChanges(); protected: Index: SAPrefsDialog.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsDialog.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SAPrefsDialog.cpp 12 Feb 2004 13:05:50 -0000 1.4 --- SAPrefsDialog.cpp 21 Feb 2004 12:14:05 -0000 1.5 *************** *** 198,202 **** iNrOfLanguages = pConfigFile->GetLanguageCount(); ! m_pEditorPref = new EditorPref[iNrOfLanguages]; if( NULL == m_pEditorPref ) return FALSE; m_pColorPref = new CColorPref[iNrOfLanguages]; --- 198,202 ---- iNrOfLanguages = pConfigFile->GetLanguageCount(); ! m_pEditorPref = new CEditorPref[iNrOfLanguages]; if( NULL == m_pEditorPref ) return FALSE; m_pColorPref = new CColorPref[iNrOfLanguages]; *************** *** 211,214 **** --- 211,215 ---- pSyntaxFile = theApp.GetSyntaxFile( iCount ); AddPage( m_pEditorPref[iCount], pConfigFile->GetLanguageName( iCount ), &dlgLang ); + m_pEditorPref[iCount].SetSyntaxFile( pSyntaxFile ); AddPage( m_pColorPref[iCount], "Color", &m_pEditorPref[iCount] ); m_pColorPref[iCount].SetSyntaxFile( pSyntaxFile ); *************** *** 554,567 **** if( m_applybutton.IsWindowEnabled() ) { // Save all the data before closing the dialogs for( iCount = 1; iCount < iNrOfLanguages; ++ iCount ) { ! m_pColorPref[iCount].SaveChanges(); ! m_pFontPref[iCount].SaveChanges(); ! // Here we actually save the data to disk. The pages save ! // it in memory. ! pSyntaxFile = theApp.GetSyntaxFile( iCount ); ! pSyntaxFile->Save(); } } --- 555,575 ---- if( m_applybutton.IsWindowEnabled() ) { + BOOL bChanged = FALSE; // Save all the data before closing the dialogs for( iCount = 1; iCount < iNrOfLanguages; ++ iCount ) { ! bChanged |= m_pEditorPref[iCount].SaveChanges(); ! bChanged |= m_pColorPref[iCount].SaveChanges(); ! bChanged |= m_pFontPref[iCount].SaveChanges(); ! // Only save the syntax file if something did ! // change. Otherwise it's only useless disk I/O ! if( bChanged ) ! { ! // Here we actually save the data to disk. The pages save ! // it in memory (the SyntaxFile object). ! pSyntaxFile = theApp.GetSyntaxFile( iCount ); ! pSyntaxFile->Save(); ! } } } Index: SAPrefsDialog.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsDialog.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SAPrefsDialog.h 12 Feb 2004 13:05:50 -0000 1.4 --- SAPrefsDialog.h 21 Feb 2004 12:14:05 -0000 1.5 *************** *** 167,171 **** CGeneralPref dlgGeneral; CLangPref dlgLang; ! EditorPref* m_pEditorPref; CColorPref* m_pColorPref; CFontPref* m_pFontPref; --- 167,171 ---- CGeneralPref dlgGeneral; CLangPref dlgLang; ! CEditorPref* m_pEditorPref; CColorPref* m_pColorPref; CFontPref* m_pFontPref; Index: SAPrefsSubDlg.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsSubDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SAPrefsSubDlg.cpp 8 May 2003 12:00:56 -0000 1.2 --- SAPrefsSubDlg.cpp 21 Feb 2004 12:14:05 -0000 1.3 *************** *** 56,59 **** --- 56,60 ---- { m_id = nID; + bChanged = FALSE; } *************** *** 107,108 **** --- 108,127 ---- return CDialog::PreTranslateMessage(pMsg); } + + void CSAPrefsSubDlg::SetSyntaxFile( CSyntaxFile* lpSyntaxFile ) + { + m_pSyntaxFile = lpSyntaxFile; + } + + BOOL CSAPrefsSubDlg::SaveChanges() + { + return bChanged; + } + + void CSAPrefsSubDlg::NotifyParentOfChange() + { + CWnd* pWnd; + bChanged = TRUE; + pWnd = GetParentOwner(); + if( NULL != pWnd ) pWnd->PostMessage( WM_PREFERENCE_CHANGED ); + } Index: SAPrefsSubDlg.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsSubDlg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SAPrefsSubDlg.h 12 Feb 2004 13:05:50 -0000 1.3 --- SAPrefsSubDlg.h 21 Feb 2004 12:14:05 -0000 1.4 *************** *** 36,39 **** --- 36,41 ---- #endif // _MSC_VER >= 1000 + #include "SyntaxFile.h" + #define WM_PREFERENCE_CHANGED (WM_USER + 2000) // User changed a setting in a sub dialog // The main dialog should enable the apply button *************** *** 41,44 **** --- 43,50 ---- class CSAPrefsSubDlg : public CDialog { + protected: + BOOL bChanged; + CSyntaxFile* m_pSyntaxFile; + public: DECLARE_DYNCREATE(CSAPrefsSubDlg) *************** *** 56,59 **** --- 62,68 ---- virtual void OnOK(); virtual void OnCancel(); + virtual void SetSyntaxFile( CSyntaxFile* lpSyntaxFile ); + virtual BOOL SaveChanges(); + virtual void NotifyParentOfChange(); DECLARE_MESSAGE_MAP() Index: SyntaxFile.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SyntaxFile.cpp 12 Feb 2004 13:05:50 -0000 1.2 --- SyntaxFile.cpp 21 Feb 2004 12:14:05 -0000 1.3 *************** *** 278,281 **** --- 278,365 ---- } + // Returns if the CurrentLine must be highlighted. + BOOL CSyntaxFile::GetHighlightCurrentLine() + { + xml_node xnode; + + xnode = xparser.document().first_element_by_name( TAG_VIEW ); + if( xnode.empty() && !xnode.children() ) return false; + + xnode = xnode.first_element_by_name( TAG_VIEW_HIGHLIGHTCURRENTLINE ); + if( xnode.empty() && !xnode.children() ) return false; + + return atoi( xnode.child(0).value() ) ? TRUE : FALSE; + } + + // Sets CurrentLine Highlighting. + BOOL CSyntaxFile::SetHighlightCurrentLine( BOOL bHighlightCurrentLine ) + { + xml_node xnode; + + xnode = xparser.document().first_element_by_name( TAG_VIEW ); + if( xnode.empty() && !xnode.children() ) return false; + + xnode = xnode.first_element_by_name( TAG_VIEW_HIGHLIGHTCURRENTLINE ); + if( xnode.empty() && !xnode.children() ) return false; + + return xnode.child(0).value( bHighlightCurrentLine ? "1" : "0" ); + } + + // Returns if the WhiteSpace should be visible. + BOOL CSyntaxFile::GetWhiteSpace() + { + xml_node xnode; + + xnode = xparser.document().first_element_by_name( TAG_VIEW ); + if( xnode.empty() && !xnode.children() ) return false; + + xnode = xnode.first_element_by_name( TAG_VIEW_WHITESPACE ); + if( xnode.empty() && !xnode.children() ) return false; + + return atoi( xnode.child(0).value() ) ? TRUE : FALSE; + } + + // Sets if the WhiteSpace should be visible. + BOOL CSyntaxFile::SetWhiteSpace( BOOL bWhiteSpace ) + { + xml_node xnode; + + xnode = xparser.document().first_element_by_name( TAG_VIEW ); + if( xnode.empty() && !xnode.children() ) return false; + + xnode = xnode.first_element_by_name( TAG_VIEW_WHITESPACE ); + if( xnode.empty() && !xnode.children() ) return false; + + return xnode.child(0).value( bWhiteSpace ? "1" : "0" ); + } + + // Returns if the EOL characthers should be visible. + BOOL CSyntaxFile::GetEOL() + { + xml_node xnode; + + xnode = xparser.document().first_element_by_name( TAG_VIEW ); + if( xnode.empty() && !xnode.children() ) return false; + + xnode = xnode.first_element_by_name( TAG_VIEW_EOL ); + if( xnode.empty() && !xnode.children() ) return false; + + return atoi( xnode.child(0).value() ) ? TRUE : FALSE; + } + + // Sets if the EOL characthers should be visible. + BOOL CSyntaxFile::SetEOL( BOOL bEOL ) + { + xml_node xnode; + + xnode = xparser.document().first_element_by_name( TAG_VIEW ); + if( xnode.empty() && !xnode.children() ) return false; + + xnode = xnode.first_element_by_name( TAG_VIEW_EOL ); + if( xnode.empty() && !xnode.children() ) return false; + + return xnode.child(0).value( bEOL ? "1" : "0" ); + } + // Returns if WordWrap is on. BOOL CSyntaxFile::GetWordWrap() *************** *** 339,343 **** // Returns if we want to use tabs or space (true is tabs!) ! BOOL CSyntaxFile::GetUseTabs() { xml_node xnode; --- 423,427 ---- // Returns if we want to use tabs or space (true is tabs!) ! BOOL CSyntaxFile::GetTabsToSpaces() { xml_node xnode; *************** *** 346,350 **** if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_VIEW_USETABS ); if( xnode.empty() && !xnode.children() ) return false; --- 430,434 ---- if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_VIEW_TABSTOSPACES ); if( xnode.empty() && !xnode.children() ) return false; *************** *** 352,357 **** } ! // Sets the UseTabs(OrSpaces) to true or false. ! BOOL CSyntaxFile::SetUseTabs( BOOL bUseTabs ) { xml_node xnode; --- 436,441 ---- } ! // Sets the TabsToSpaces to true or false. ! BOOL CSyntaxFile::SetTabsToSpaces( BOOL bTabsToSpaces ) { xml_node xnode; *************** *** 360,367 **** if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_VIEW_USETABS ); if( xnode.empty() && !xnode.children() ) return false; ! return xnode.child(0).value( bUseTabs ? "1" : "0" ); } --- 444,567 ---- if( xnode.empty() && !xnode.children() ) return false; ! xnode = xnode.first_element_by_name( TAG_VIEW_TABSTOSPACES ); if( xnode.empty() && !xnode.children() ) return false; ! return xnode.child(0).value( bTabsToSpaces ? "1" : "0" ); ! } ! ! // Returns if the Indent is on. ! BOOL CSyntaxFile::GetIndent() ! { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; ! } ! ! // Set the Indent to true or false. ! BOOL CSyntaxFile::SetIndent( BOOL bIndent ) ! { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bIndent ? "1" : "0" ); ! } ! ! // Gets the IndentSize ! int CSyntaxFile::GetIndentSize() ! { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENTSIZE ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ); ! } ! ! // Sets the IndentSize to iIndentSize. ! BOOL CSyntaxFile::SetIndentSize( int iIndentSize ) ! { ! xml_node xnode; ! char szIndentSize[5]; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENTSIZE ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! sprintf( szIndentSize, "%i", iIndentSize ); ! return xnode.child(0).value( szIndentSize ); ! } ! ! // Get the AutoIndent value ! int CSyntaxFile::GetAutoIndent() ! { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_AUTOINDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ); ! } ! ! // Sets the AutoIndent value ! BOOL CSyntaxFile::SetAutoIndent( int iAutoIndent ) ! { ! xml_node xnode; ! char szAutoIndent[5]; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_AUTOINDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! sprintf( szAutoIndent, "%i", iAutoIndent ); ! return xnode.child(0).value( szAutoIndent); ! } ! ! // Gets if the IndentGuides are on. ! BOOL CSyntaxFile::GetIndentGuides() ! { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENTGUIDES ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return atoi( xnode.child(0).value() ) ? TRUE : FALSE; ! } ! ! // Sets the IndentGuides on or off. ! BOOL CSyntaxFile::SetIndentGuides( BOOL bIndentGuides ) ! { ! xml_node xnode; ! ! xnode = xparser.document().first_element_by_name( TAG_INDENT ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! xnode = xnode.first_element_by_name( TAG_INDENT_INDENTGUIDES ); ! if( xnode.empty() && !xnode.children() ) return false; ! ! return xnode.child(0).value( bIndentGuides ? "1" : "0" ); } Index: SyntaxFile.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SyntaxFile.h 12 Feb 2004 13:05:50 -0000 1.2 --- SyntaxFile.h 21 Feb 2004 12:14:05 -0000 1.3 *************** *** 26,29 **** --- 26,30 ---- #define TAG_KEYWORDS "Keywords" #define TAG_VIEW "View" + #define TAG_INDENT "Indent" #define TAG_MARGINS "Margins" #define TAG_STYLE "Style" *************** *** 45,54 **** // View sub tags #define TAG_VIEW_SYNTAXHIGHLIGHTING "SyntaxHighlighting" #define TAG_VIEW_WORDWRAP "WordWrap" #define TAG_VIEW_TABWIDTH "TabWidth" ! #define TAG_VIEW_USETABS "UseTabs" #define TAG_VIEW_RIGHTEDGE "RightEdge" #define TAG_VIEW_RIGHTEDGECOLUMN "RightEdgeColumn" // Margin sub tags #define TAG_MARGINS_LINENUMBERS "LineNumbers" --- 46,64 ---- // View sub tags #define TAG_VIEW_SYNTAXHIGHLIGHTING "SyntaxHighlighting" + #define TAG_VIEW_HIGHLIGHTCURRENTLINE "HighlightCurrentLine" + #define TAG_VIEW_WHITESPACE "WhiteSpace" + #define TAG_VIEW_EOL "EOL" #define TAG_VIEW_WORDWRAP "WordWrap" #define TAG_VIEW_TABWIDTH "TabWidth" ! #define TAG_VIEW_TABSTOSPACES "TabsToSpaces" #define TAG_VIEW_RIGHTEDGE "RightEdge" #define TAG_VIEW_RIGHTEDGECOLUMN "RightEdgeColumn" + // Indentation sub tags + #define TAG_INDENT_INDENT "Indent" + #define TAG_INDENT_INDENTSIZE "IndentSize" + #define TAG_INDENT_AUTOINDENT "AutoIndent" + #define TAG_INDENT_INDENTGUIDES "IndentGuides" + // Margin sub tags #define TAG_MARGINS_LINENUMBERS "LineNumbers" *************** *** 130,133 **** --- 140,161 ---- BOOL SetSyntaxHighlighting( BOOL bSyntaxHighlighting ); + // Returns if the CurrentLine must be Highlighted. + BOOL GetHighlightCurrentLine(); + + // Sets CurrentLine Highlighting. + BOOL SetHighlightCurrentLine( BOOL bHighlightCurrentLine ); + + // Returns if the WhiteSpace should be visible. + BOOL GetWhiteSpace(); + + // Sets if the WhiteSpace should be visible. + BOOL SetWhiteSpace( BOOL bWhiteSpace ); + + // Returns if the EOL characthers should be visible. + BOOL GetEOL(); + + // Sets if the EOL characthers should be visible. + BOOL SetEOL( BOOL bEOL ); + // Returns if WordWrap is on. BOOL GetWordWrap(); *************** *** 142,150 **** BOOL SetTabWidth( int iTabWidth ); ! // Returns if we want to use tabs or space (true is tabs!) ! BOOL GetUseTabs(); ! // Sets the UseTabs(OrSpaces) to true or false. ! BOOL SetUseTabs( BOOL bUseTabs ); // Get the RightEdge type. --- 170,202 ---- BOOL SetTabWidth( int iTabWidth ); ! // Returns if we want to use tabs or space (true is spaces!) ! BOOL GetTabsToSpaces(); ! // Sets the TabsToSpaces to true or false. ! BOOL SetTabsToSpaces( BOOL bUseTabs ); ! ! // Returns if Indent is on. ! int GetIndent(); ! ! // Sets Indent to true or false. ! BOOL SetIndent( BOOL bIndent ); ! ! // Gets the IndentSize ! BOOL GetIndentSize(); ! ! // Sets the IndentSize to iIndentSize ! BOOL SetIndentSize( int iIndentSize ); ! ! // Get the AutoIndent value ! int GetAutoIndent(); ! ! // Sets the AutoIndent value ! BOOL SetAutoIndent( int iAutoIndent ); ! ! // Gets if the IndentGuides are on. ! BOOL GetIndentGuides(); ! ! // Sets the IndentGuides on or off. ! BOOL SetIndentGuides( BOOL bIndentGuides ); // Get the RightEdge type. Index: resource.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/resource.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** resource.h 12 Feb 2004 13:05:50 -0000 1.19 --- resource.h 21 Feb 2004 12:14:05 -0000 1.20 *************** *** 125,130 **** --- 125,132 ---- #define IDC_RADIO3 1008 #define IDC_CHECK8 1008 + #define IDC_CHECK_WHITESPACE 1008 #define IDC_CAPTION_BAR 1009 #define IDC_CHECK9 1009 + #define IDC_RADIO_AUTOINDENT1 1009 #define IDC_PAGE_TREE 1010 #define IDC_CHECK10 1010 *************** *** 134,137 **** --- 136,140 ---- #define IDC_CHECK11 1012 #define IDC_EDIT3 1012 + #define IDC_CHECK_TABSTOSPACES 1012 #define IDC_COMBO1 1013 #define IDC_EDIT4 1013 *************** *** 141,146 **** --- 144,151 ---- #define IDC_COMBO2 1015 #define IDC_EDIT6 1015 + #define IDC_CHECK_INDENTS 1015 #define IDC_CBUTTON_FORE 1016 #define IDC_EDIT7 1016 + #define IDC_CHECK_INDENTSGUIDES 1016 #define IDC_CBUTTON_BACK 1017 #define IDC_EDIT_LIST 1028 *************** *** 177,180 **** --- 182,186 ---- #define IDREPLACE 1075 #define IDC_CHECK13 1076 + #define IDC_CHECK_RIGHTEDGE 1076 #define IDC_PREF_TOOLS_ERRORPARSERBUTTON 1078 #define IDC_ERRPARSERSPREDEFINED 1079 *************** *** 197,200 **** --- 203,216 ---- #define IDC_STATIC_STYLE 1096 #define IDC_COMBO_STYLE 1097 + #define IDC_EDIT_INDENT 1098 + #define IDC_EDIT_TAB 1099 + #define IDC_EDIT_RIGHTEDGE 1100 + #define IDC_CHECK_LINENUMBERS 1101 + #define IDC_CHECK_BOOKMARK 1102 + #define IDC_CHECK_FOLD 1103 + #define IDC_CHECK_WORDWRAP 1104 + #define IDC_CHECK_EOL 1105 + #define IDC_RADIO_AUTOINDENT3 1106 + #define IDC_RADIO_AUTOINDENT2 1107 #define stc32 0x045f #define IDC_OUTLOOK_BAR_PLACEHOLDER 1432 *************** *** 482,486 **** #define _APS_NEXT_RESOURCE_VALUE 252 #define _APS_NEXT_COMMAND_VALUE 33075 ! #define _APS_NEXT_CONTROL_VALUE 1098 #define _APS_NEXT_SYMED_VALUE 105 #endif --- 498,502 ---- #define _APS_NEXT_RESOURCE_VALUE 252 #define _APS_NEXT_COMMAND_VALUE 33075 ! #define _APS_NEXT_CONTROL_VALUE 1108 #define _APS_NEXT_SYMED_VALUE 105 #endif |
Update of /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3172/Config/Default/Syntax Modified Files: cpp.syn default.syn java.syn javascript.syn masm.syn perl.syn python.syn Log Message: New Default Syntax files and AnyEdit Executable because of Preferences update. Index: cpp.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/cpp.syn,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cpp.syn 12 Dec 2003 12:05:18 -0000 1.1 --- cpp.syn 21 Feb 2004 11:58:52 -0000 1.2 *************** *** 7,19 **** <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> ! <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> --- 7,28 ---- <View> <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <WhiteSpace>0</WhiteSpace> + <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> + <Indent> + <Indent>1</Indent> + <IndentSize>4</IndentSize> + <AutoIndent>0</AutoIndent> + <IndentGuides>1</IndentGuides> + </Indent> <Margins> <LineNumbers>1</LineNumbers> ! <BookMark>1</BookMark> <Fold>1</Fold> </Margins> *************** *** 90,94 **** </Style> <Style number="37"> ! <Name>Indentation</Name> <Font> <Name>Verdana</Name> --- 99,103 ---- </Style> <Style number="37"> ! <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> *************** *** 394,398 **** <Word>float</Word> <Word>for</Word> ! <Word>friend </Word> <Word>goto</Word> <Word>if</Word> --- 403,407 ---- <Word>float</Word> <Word>for</Word> ! <Word>friend</Word> <Word>goto</Word> <Word>if</Word> *************** *** 417,421 **** <Word>struct</Word> <Word>switch</Word> ! <Word>template</Word> <Word>this</Word> <Word>throw</Word> --- 426,430 ---- <Word>struct</Word> <Word>switch</Word> ! <Word>template</Word> <Word>this</Word> <Word>throw</Word> *************** *** 424,434 **** <Word>typedef</Word> <Word>typeid</Word> ! <Word>typename</Word> <Word>union</Word> ! <Word>unsigned</Word> <Word>using</Word> <Word>virtual</Word> <Word>void</Word> ! <Word>volatile</Word> <Word>wchar_t</Word> <Word>while</Word> --- 433,443 ---- <Word>typedef</Word> <Word>typeid</Word> ! <Word>typename</Word> <Word>union</Word> ! <Word>unsigned</Word> <Word>using</Word> <Word>virtual</Word> <Word>void</Word> ! <Word>volatile</Word> <Word>wchar_t</Word> <Word>while</Word> *************** *** 522,526 **** <Word>section</Word> <Word>see</Word> ! <Word>showinitializer</Word> <Word>since</Word> <Word>skip</Word> --- 531,535 ---- <Word>section</Word> <Word>see</Word> ! <Word>showinitializer</Word> <Word>since</Word> <Word>skip</Word> Index: default.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/default.syn,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** default.syn 12 Dec 2003 12:05:18 -0000 1.1 --- default.syn 21 Feb 2004 11:58:53 -0000 1.2 *************** *** 2,14 **** <View> <SyntaxHighlighting>0</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>8</TabWidth> ! <UseTabs>0</UseTabs> <RightEdge>0</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>0</LineNumbers> ! <Bookmark>0</Bookmark> <Fold>0</Fold> </Margins> --- 2,23 ---- <View> <SyntaxHighlighting>0</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <WhiteSpace>0</WhiteSpace> + <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>8</TabWidth> ! <TabsToSpaces>0</TabsToSpaces> <RightEdge>0</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> + <Indent> + <Indent>0</Indent> + <IndentSize>0</IndentSize> + <AutoIndent>0</AutoIndent> + <IndentGuides>0</IndentGuides> + </Indent> <Margins> <LineNumbers>0</LineNumbers> ! <BookMark>0</BookMark> <Fold>0</Fold> </Margins> *************** *** 71,75 **** </Style> <Style number="37"> ! <Name>Indentation</Name> <Font> <Name>Verdana</Name> --- 80,84 ---- </Style> <Style number="37"> ! <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> Index: java.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/java.syn,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** java.syn 12 Dec 2003 12:05:18 -0000 1.1 --- java.syn 21 Feb 2004 11:58:53 -0000 1.2 *************** *** 7,19 **** <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> ! <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> --- 7,28 ---- <View> <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <WhiteSpace>0</WhiteSpace> + <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> + <Indent> + <Indent>1</Indent> + <IndentSize>4</IndentSize> + <AutoIndent>0</AutoIndent> + <IndentGuides>1</IndentGuides> + </Indent> <Margins> <LineNumbers>1</LineNumbers> ! <BookMark>1</BookMark> <Fold>1</Fold> </Margins> *************** *** 90,94 **** </Style> <Style number="37"> ! <Name>Indentation</Name> <Font> <Name>Verdana</Name> --- 99,103 ---- </Style> <Style number="37"> ! <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> Index: javascript.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/javascript.syn,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** javascript.syn 12 Dec 2003 14:54:12 -0000 1.1 --- javascript.syn 21 Feb 2004 11:58:53 -0000 1.2 *************** *** 7,19 **** <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> ! <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> --- 7,28 ---- <View> <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <WhiteSpace>0</WhiteSpace> + <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> + <Indent> + <Indent>1</Indent> + <IndentSize>4</IndentSize> + <AutoIndent>0</AutoIndent> + <IndentGuides>1</IndentGuides> + </Indent> <Margins> <LineNumbers>1</LineNumbers> ! <BookMark>1</BookMark> <Fold>1</Fold> </Margins> *************** *** 90,94 **** </Style> <Style number="37"> ! <Name>Indentation</Name> <Font> <Name>Verdana</Name> --- 99,103 ---- </Style> <Style number="37"> ! <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> Index: masm.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/masm.syn,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** masm.syn 12 Dec 2003 14:54:12 -0000 1.1 --- masm.syn 21 Feb 2004 11:58:53 -0000 1.2 *************** *** 5,17 **** <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> ! <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> --- 5,26 ---- <View> <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <WhiteSpace>0</WhiteSpace> + <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> + <Indent> + <Indent>1</Indent> + <IndentSize>4</IndentSize> + <AutoIndent>0</AutoIndent> + <IndentGuides>1</IndentGuides> + </Indent> <Margins> <LineNumbers>1</LineNumbers> ! <BookMark>1</BookMark> <Fold>1</Fold> </Margins> *************** *** 60,64 **** </Style> <Style number="37"> ! <Name>Indentation</Name> <Font> <Name>Verdana</Name> --- 69,73 ---- </Style> <Style number="37"> ! <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> Index: perl.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/perl.syn,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** perl.syn 12 Dec 2003 14:54:12 -0000 1.1 --- perl.syn 21 Feb 2004 11:58:53 -0000 1.2 *************** *** 7,19 **** <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> ! <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> --- 7,28 ---- <View> <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <WhiteSpace>0</WhiteSpace> + <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> + <Indent> + <Indent>1</Indent> + <IndentSize>4</IndentSize> + <AutoIndent>0</AutoIndent> + <IndentGuides>1</IndentGuides> + </Indent> <Margins> <LineNumbers>1</LineNumbers> ! <BookMark>1</BookMark> <Fold>1</Fold> </Margins> *************** *** 90,94 **** </Style> <Style number="37"> ! <Name>Indentation</Name> <Font> <Name>Verdana</Name> --- 99,103 ---- </Style> <Style number="37"> ! <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> Index: python.syn =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax/python.syn,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** python.syn 12 Dec 2003 14:54:12 -0000 1.1 --- python.syn 21 Feb 2004 11:58:53 -0000 1.2 *************** *** 7,19 **** <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> ! <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> --- 7,28 ---- <View> <SyntaxHighlighting>1</SyntaxHighlighting> + <HighlightCurrentLine>1</HighlightCurrentLine> + <WhiteSpace>0</WhiteSpace> + <EOL>0</EOL> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> ! <TabsToSpaces>0</TabsToSpaces> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> + <Indent> + <Indent>1</Indent> + <IndentSize>4</IndentSize> + <AutoIndent>0</AutoIndent> + <IndentGuides>1</IndentGuides> + </Indent> <Margins> <LineNumbers>1</LineNumbers> ! <BookMark>1</BookMark> <Fold>1</Fold> </Margins> *************** *** 90,94 **** </Style> <Style number="37"> ! <Name>Indentation</Name> <Font> <Name>Verdana</Name> --- 99,103 ---- </Style> <Style number="37"> ! <Name>Indentation Guides</Name> <Font> <Name>Verdana</Name> |
From: <moo...@us...> - 2004-02-21 12:10:51
|
Update of /cvsroot/anyedit/AnyEditBin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3172 Modified Files: AnyEdit.exe Log Message: New Default Syntax files and AnyEdit Executable because of Preferences update. Index: AnyEdit.exe =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/AnyEdit.exe,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsqJWHjH and /tmp/cvsWTb2U4 differ |
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26170 Modified Files: AnyEdit.dsp AnyEditView.cpp AnyEditView.h StdAfx.h scintillaif.cpp scintillaif.h Added Files: Platform.h Log Message: Print Support Added - Added Platform.h from Scintilla includes. - CScintilla::FormatRange returns long. - CScintilla::SetPrintWordWrapMode added. - CScintilla::GetPrintWordWrapMode added. - Added Print support to OnBeginPrinting, OnPrint and OnEndPrinting in AnyEditView. --- NEW FILE: Platform.h --- // Scintilla source code edit control /** @file Platform.h ** Interface to platform facilities. Also includes some basic utilities. ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. **/ // Copyright 1998-2003 by Neil Hodgson <ne...@sc...> // The License.txt file describes the conditions under which this software may be distributed. #ifndef PLATFORM_H #define PLATFORM_H // PLAT_GTK = GTK+ on Linux or Win32 // PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 // PLAT_WIN = Win32 API on Win32 OS // PLAT_WX is wxWindows on any supported platform #define PLAT_GTK 0 #define PLAT_GTK_WIN32 0 #define PLAT_WIN 0 #define PLAT_WX 0 #define PLAT_FOX 0 #if defined(FOX) #undef PLAT_FOX #define PLAT_FOX 1 #elif defined(__WX__) #undef PLAT_WX #define PLAT_WX 1 #elif defined(GTK) #undef PLAT_GTK #define PLAT_GTK 1 #ifdef _MSC_VER #undef PLAT_GTK_WIN32 #define PLAT_GTK_WIN32 1 #endif #else #undef PLAT_WIN #define PLAT_WIN 1 #endif // Underlying the implementation of the platform classes are platform specific types. // Sometimes these need to be passed around by client code so they are defined here typedef void *FontID; typedef void *SurfaceID; typedef void *WindowID; typedef void *MenuID; typedef void *TickerID; typedef void *Function; typedef void *IdlerID; /** * A geometric point class. * Point is exactly the same as the Win32 POINT and GTK+ GdkPoint so can be used interchangeably. */ class Point { public: int x; int y; Point(int x_=0, int y_=0) : x(x_), y(y_) { } // Other automatically defined methods (assignment, copy constructor, destructor) are fine static Point FromLong(long lpoint); }; /** * A geometric rectangle class. * PRectangle is exactly the same as the Win32 RECT so can be used interchangeably. * PRectangles contain their top and left sides, but not their right and bottom sides. */ class PRectangle { public: int left; int top; int right; int bottom; PRectangle(int left_=0, int top_=0, int right_=0, int bottom_ = 0) : left(left_), top(top_), right(right_), bottom(bottom_) { } // Other automatically defined methods (assignment, copy constructor, destructor) are fine bool operator==(PRectangle &rc) { return (rc.left == left) && (rc.right == right) && (rc.top == top) && (rc.bottom == bottom); } bool Contains(Point pt) { return (pt.x >= left) && (pt.x <= right) && (pt.y >= top) && (pt.y <= bottom); } bool Contains(PRectangle rc) { return (rc.left >= left) && (rc.right <= right) && (rc.top >= top) && (rc.bottom <= bottom); } bool Intersects(PRectangle other) { return (right > other.left) && (left < other.right) && (bottom > other.top) && (top < other.bottom); } void Move(int xDelta, int yDelta) { left += xDelta; top += yDelta; right += xDelta; bottom += yDelta; } int Width() { return right - left; } int Height() { return bottom - top; } }; /** * In some circumstances, including Win32 in paletted mode and GTK+, each colour * must be allocated before use. The desired colours are held in the ColourDesired class, * and after allocation the allocation entry is stored in the ColourAllocated class. In other * circumstances, such as Win32 in true colour mode, the allocation process just copies * the RGB values from the desired to the allocated class. * As each desired colour requires allocation before it can be used, the ColourPair class * holds both a ColourDesired and a ColourAllocated * The Palette class is responsible for managing the palette of colours which contains a * list of ColourPair objects and performs the allocation. */ /** * Holds a desired RGB colour. */ class ColourDesired { long co; public: ColourDesired(long lcol=0) { co = lcol; } ColourDesired(unsigned int red, unsigned int green, unsigned int blue) { Set(red, green, blue); } bool operator==(const ColourDesired &other) const { return co == other.co; } void Set(long lcol) { co = lcol; } void Set(unsigned int red, unsigned int green, unsigned int blue) { co = red | (green << 8) | (blue << 16); } static inline unsigned int ValueOfHex(const char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; else if (ch >= 'A' && ch <= 'F') return ch - 'A' + 10; else if (ch >= 'a' && ch <= 'f') return ch - 'a' + 10; else return 0; } void Set(const char *val) { if (*val == '#') { val++; } unsigned int r = ValueOfHex(val[0]) * 16 + ValueOfHex(val[1]); unsigned int g = ValueOfHex(val[2]) * 16 + ValueOfHex(val[3]); unsigned int b = ValueOfHex(val[4]) * 16 + ValueOfHex(val[5]); Set(r, g, b); } long AsLong() const { return co; } unsigned int GetRed() { return co & 0xff; } unsigned int GetGreen() { return (co >> 8) & 0xff; } unsigned int GetBlue() { return (co >> 16) & 0xff; } }; /** * Holds an allocated RGB colour which may be an approximation to the desired colour. */ class ColourAllocated { long coAllocated; public: ColourAllocated(long lcol=0) { coAllocated = lcol; } void Set(long lcol) { coAllocated = lcol; } long AsLong() const { return coAllocated; } }; /** * Colour pairs hold a desired colour and an allocated colour. */ struct ColourPair { ColourDesired desired; ColourAllocated allocated; ColourPair(ColourDesired desired_=ColourDesired(0,0,0)) { desired = desired_; allocated.Set(desired.AsLong()); } void Copy() { allocated.Set(desired.AsLong()); } }; class Window; // Forward declaration for Palette /** * Colour palette management. */ class Palette { int used; enum {numEntries = 100}; ColourPair entries[numEntries]; #if PLAT_GTK void *allocatedPalette; // GdkColor * int allocatedLen; #endif public: #if PLAT_WIN void *hpal; #endif bool allowRealization; Palette(); ~Palette(); void Release(); /** * This method either adds a colour to the list of wanted colours (want==true) * or retrieves the allocated colour back to the ColourPair. * This is one method to make it easier to keep the code for wanting and retrieving in sync. */ void WantFind(ColourPair &cp, bool want); void Allocate(Window &w); }; /** * Font management. */ class Font { protected: FontID id; #if PLAT_WX int ascent; #endif // Private so Font objects can not be copied Font(const Font &) {} Font &operator=(const Font &) { id=0; return *this; } public: Font(); virtual ~Font(); virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic); virtual void Release(); FontID GetID() { return id; } // Alias another font - caller guarantees not to Release void SetID(FontID id_) { id = id_; } friend class Surface; }; /** * A surface abstracts a place to draw. */ class Surface { private: // Private so Surface objects can not be copied Surface(const Surface &) {} Surface &operator=(const Surface &) { return *this; } public: Surface() {}; virtual ~Surface() {}; static Surface *Allocate(); virtual void Init(WindowID wid)=0; virtual void Init(SurfaceID sid, WindowID wid)=0; virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; virtual void Release()=0; virtual bool Initialised()=0; virtual void PenColour(ColourAllocated fore)=0; virtual int LogPixelsY()=0; virtual int DeviceHeightFont(int points)=0; virtual void MoveTo(int x_, int y_)=0; virtual void LineTo(int x_, int y_)=0; virtual void Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back)=0; virtual void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void FillRectangle(PRectangle rc, ColourAllocated back)=0; virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; virtual void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back)=0; virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; virtual void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; virtual void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back)=0; virtual void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore)=0; virtual void MeasureWidths(Font &font_, const char *s, int len, int *positions)=0; virtual int WidthText(Font &font_, const char *s, int len)=0; virtual int WidthChar(Font &font_, char ch)=0; virtual int Ascent(Font &font_)=0; virtual int Descent(Font &font_)=0; virtual int InternalLeading(Font &font_)=0; virtual int ExternalLeading(Font &font_)=0; virtual int Height(Font &font_)=0; virtual int AverageCharWidth(Font &font_)=0; virtual int SetPalette(Palette *pal, bool inBackGround)=0; virtual void SetClip(PRectangle rc)=0; virtual void FlushCachedState()=0; virtual void SetUnicodeMode(bool unicodeMode_)=0; virtual void SetDBCSMode(int codePage)=0; }; /** * A simple callback action passing one piece of untyped user data. */ typedef void (*CallBackAction)(void*); /** * Class to hide the details of window manipulation. * Does not own the window which will normally have a longer life than this object. */ class Window { protected: WindowID id; public: Window() : id(0), cursorLast(cursorInvalid) {} Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) {} virtual ~Window(); Window &operator=(WindowID id_) { id = id_; return *this; } WindowID GetID() const { return id; } bool Created() const { return id != 0; } void Destroy(); bool HasFocus(); PRectangle GetPosition(); void SetPosition(PRectangle rc); void SetPositionRelative(PRectangle rc, Window relativeTo); PRectangle GetClientPosition(); void Show(bool show=true); void InvalidateAll(); void InvalidateRectangle(PRectangle rc); virtual void SetFont(Font &font); enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; void SetCursor(Cursor curs); void SetTitle(const char *s); private: Cursor cursorLast; }; /** * Listbox management. */ class ListBox : public Window { public: ListBox(); virtual ~ListBox(); static ListBox *Allocate(); virtual void SetFont(Font &font)=0; virtual void Create(Window &parent, int ctrlID, int lineHeight_, bool unicodeMode_)=0; virtual void SetAverageCharWidth(int width)=0; virtual void SetVisibleRows(int rows)=0; virtual PRectangle GetDesiredRect()=0; virtual int CaretFromEdge()=0; virtual void Clear()=0; virtual void Append(char *s, int type = -1)=0; virtual int Length()=0; virtual void Select(int n)=0; virtual int GetSelection()=0; virtual int Find(const char *prefix)=0; virtual void GetValue(int n, char *value, int len)=0; virtual void RegisterImage(int type, const char *xpm_data)=0; virtual void ClearRegisteredImages()=0; virtual void SetDoubleClickAction(CallBackAction, void *)=0; }; /** * Menu management. */ class Menu { MenuID id; public: Menu(); MenuID GetID() { return id; } void CreatePopUp(); void Destroy(); void Show(Point pt, Window &w); }; class ElapsedTime { long bigBit; long littleBit; public: ElapsedTime(); double Duration(bool reset=false); }; /** * Dynamic Library (DLL/SO/...) loading */ class DynamicLibrary { public: virtual ~DynamicLibrary() {}; /// @return Pointer to function "name", or NULL on failure. virtual Function FindFunction(const char *name) = 0; /// @return true if the library was loaded successfully. virtual bool IsValid() = 0; /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. static DynamicLibrary *Load(const char *modulePath); }; /** * Platform class used to retrieve system wide parameters such as double click speed * and chrome colour. Not a creatable object, more of a module with several functions. */ class Platform { // Private so Platform objects can not be copied Platform(const Platform &) {} Platform &operator=(const Platform &) { return *this; } public: // Should be private because no new Platforms are ever created // but gcc warns about this Platform() {} ~Platform() {} static ColourDesired Chrome(); static ColourDesired ChromeHighlight(); static const char *DefaultFont(); static int DefaultFontSize(); static unsigned int DoubleClickTime(); static bool MouseButtonBounce(); static void DebugDisplay(const char *s); static bool IsKeyDown(int key); static long SendScintilla( WindowID w, unsigned int msg, unsigned long wParam=0, long lParam=0); static long SendScintillaPointer( WindowID w, unsigned int msg, unsigned long wParam=0, void *lParam=0); static bool IsDBCSLeadByte(int codePage, char ch); static int DBCSCharLength(int codePage, const char *s); static int DBCSCharMaxLength(); // These are utility functions not really tied to a platform static int Minimum(int a, int b); static int Maximum(int a, int b); // Next three assume 16 bit shorts and 32 bit longs static long LongFromTwoShorts(short a,short b) { return (a) | ((b) << 16); } static short HighShortFromLong(long x) { return static_cast<short>(x >> 16); } static short LowShortFromLong(long x) { return static_cast<short>(x & 0xffff); } static void DebugPrintf(const char *format, ...); static bool ShowAssertionPopUps(bool assertionPopUps_); static void Assert(const char *c, const char *file, int line); static int Clamp(int val, int minVal, int maxVal); }; #ifdef NDEBUG #define PLATFORM_ASSERT(c) ((void)0) #else #define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__)) #endif // Shut up annoying Visual C++ warnings: #ifdef _MSC_VER #pragma warning(disable: 4244 4309 4514 4710) #endif #endif Index: AnyEdit.dsp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.dsp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** AnyEdit.dsp 12 Dec 2003 11:00:04 -0000 1.29 --- AnyEdit.dsp 19 Feb 2004 07:39:34 -0000 1.30 *************** *** 1371,1374 **** --- 1371,1378 ---- # Begin Source File + SOURCE=.\Platform.h + # End Source File + # Begin Source File + SOURCE=.\SciLexer.h # End Source File Index: AnyEditView.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** AnyEditView.cpp 12 Dec 2003 11:00:04 -0000 1.41 --- AnyEditView.cpp 19 Feb 2004 07:39:34 -0000 1.42 *************** *** 14,17 **** --- 14,20 ---- #include "SyntaxFile.h" + #include "Platform.h" + #include "Scintilla.h" + #ifdef _DEBUG #define new DEBUG_NEW *************** *** 114,118 **** ON_WM_CONTEXTMENU() // Standard printing commands ! //ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) //ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) //ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) --- 117,121 ---- ON_WM_CONTEXTMENU() // Standard printing commands ! ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) //ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) //ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) *************** *** 181,196 **** BOOL CAnyEditView::OnPreparePrinting(CPrintInfo* pInfo) { ! // default preparation return DoPreparePrinting(pInfo); } ! void CAnyEditView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { ! // TODO: add extra initialization before printing } void CAnyEditView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { ! // TODO: add cleanup after printing } --- 184,290 ---- BOOL CAnyEditView::OnPreparePrinting(CPrintInfo* pInfo) { ! // If we have a selection enable the selection option on ! // the print dialog. ! if( m_Scintilla.GetSelectionEnd() - m_Scintilla.GetSelectionStart() ) ! { ! pInfo->m_pPD->m_pd.Flags &= ~PD_NOSELECTION; ! } ! return DoPreparePrinting(pInfo); } ! //! ! // Before we start printing, we are going to calculate the offsets ! // of each page we are going to print. ! // ! void CAnyEditView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) { ! int iSelectionStart = m_Scintilla.GetSelectionStart(); ! int iSelectionEnd = m_Scintilla.GetSelectionEnd(); ! ! long lDocLength = m_Scintilla.GetLength(); ! long lLengthPrinted = 0; ! ! // The user want to print the selection. so recalculate start and end. ! if( pInfo->m_pPD->m_pd.Flags & PD_SELECTION ) ! { ! lLengthPrinted = iSelectionStart; ! lDocLength = iSelectionEnd - 1; ! ! // Just to make sure. ! if( lLengthPrinted < 0 ) lLengthPrinted = 0; ! if( lDocLength > m_Scintilla.GetLength() ) lDocLength = m_Scintilla.GetLength(); ! } ! ! // Fill the struct with the device contexts and the printable rect. ! RangeToFormat frPrint; ! frPrint.hdc = pDC->GetSafeHdc(); ! frPrint.hdcTarget = pDC->m_hAttribDC; ! frPrint.rcPage.left = frPrint.rc.left = 0; ! frPrint.rcPage.right = frPrint.rc.right = pDC->GetDeviceCaps(HORZRES); ! frPrint.rcPage.top = frPrint.rc.top = 0; ! frPrint.rcPage.bottom = frPrint.rc.bottom = pDC->GetDeviceCaps(VERTRES); ! ! ! // Make the printer, print the letters a little smaller, we're not blind. ! m_Scintilla.SetPrintMagnification( -2 ); ! ! // Make it warp long lines on the printed page. ! m_Scintilla.SetPrintWrapMode( 1 ); ! ! // Now calculate the character offset for each page and store it. ! while( lLengthPrinted < lDocLength ) ! { ! frPrint.chrg.cpMin = lLengthPrinted; ! frPrint.chrg.cpMax = lDocLength; ! ! m_PrintPageIndex.Add( lLengthPrinted ); ! ! lLengthPrinted = m_Scintilla.FormatRange( false,(long)&frPrint ); ! } ! // Store the DocLength as the last value in the array ! m_PrintPageIndex.Add( lDocLength ); ! ! // Reset the scintilla internal print things. ! m_Scintilla.FormatRange( false, 0 ); ! ! // Return the number of pages to the Printer Info. ! pInfo->SetMaxPage( m_PrintPageIndex.GetSize() - 1 ); ! } ! ! void CAnyEditView::OnPrint(CDC* pDC, CPrintInfo* pInfo) ! { ! RangeToFormat frPrint; ! ! // Set the structure with the device contexts and the drawing rects ! frPrint.hdc = pDC->GetSafeHdc(); ! frPrint.hdcTarget = pDC->m_hAttribDC; ! frPrint.rc.left = pInfo->m_rectDraw.left; ! frPrint.rc.right = pInfo->m_rectDraw.right; ! frPrint.rc.top = pInfo->m_rectDraw.top; ! frPrint.rc.bottom = pInfo->m_rectDraw.bottom; ! frPrint.rcPage.left = pInfo->m_rectDraw.left; ! frPrint.rcPage.right = pInfo->m_rectDraw.right; ! frPrint.rcPage.top = pInfo->m_rectDraw.top; ! frPrint.rcPage.bottom = pInfo->m_rectDraw.bottom; ! ! // Fill the struct with the offset for the page we are printing ! frPrint.chrg.cpMin = m_PrintPageIndex[pInfo->m_nCurPage - 1]; ! frPrint.chrg.cpMax = m_PrintPageIndex[m_PrintPageIndex.GetSize() - 1]; ! ! // Make the printer, print the letters a little smaller, we're not blind. ! m_Scintilla.SetPrintMagnification( -2 ); ! ! // Make it warp long lines on the printed page. ! m_Scintilla.SetPrintWrapMode( 1 ); ! ! // Print a page. ! m_Scintilla.FormatRange( true, (long)&frPrint); } void CAnyEditView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { ! // Remove old indexes, save a little memory. ! m_PrintPageIndex.RemoveAll(); } *************** *** 2094,2107 **** } - void CAnyEditView::OnPrint(CDC* pDC, CPrintInfo* pInfo) - { - // TODO: Add your specialized code here and/or call the base class - //m_Scintilla.PrintClient(pDC,PRF_OWNED); - //CView::OnPrint(pDC, pInfo); - /*RangeToFormat frPrint; - frPrint.hdc = pDC; - frPrint.hdcTarget=pDC; - m_Scintilla.FormatRange(true,(long)&frPrint);*/ - } void CAnyEditView::OnFilePrintPreview() --- 2188,2191 ---- Index: AnyEditView.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditView.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** AnyEditView.h 12 Dec 2003 11:00:04 -0000 1.23 --- AnyEditView.h 19 Feb 2004 07:39:34 -0000 1.24 *************** *** 89,92 **** --- 89,93 ---- // Generated message map functions protected: + CUIntArray m_PrintPageIndex; void GetWordsNear(LPCSTR sword,int rootlen,CStringArray &wordsNear); void ParseClassView(); Index: StdAfx.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/StdAfx.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StdAfx.h 8 Dec 2003 08:11:20 -0000 1.4 --- StdAfx.h 19 Feb 2004 07:39:34 -0000 1.5 *************** *** 32,35 **** --- 32,38 ---- #define PUGAPI_VERSION_MINOR 2 //The Pug XML library minor version we are using in this implementation. + // Scintilla Printing stuff + #include "Platform.h" + //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. Index: scintillaif.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/scintillaif.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** scintillaif.cpp 7 Dec 2003 17:06:11 -0000 1.10 --- scintillaif.cpp 19 Feb 2004 07:39:34 -0000 1.11 *************** *** 1131,1134 **** --- 1131,1144 ---- } + void CScintilla::SetPrintWrapMode(int mode) + { + SPerform(SCI_SETPRINTWRAPMODE, (long)mode, 0); + } + + int CScintilla::GetPrintWrapMode() + { + return (int)SPerform(SCI_GETPRINTWRAPMODE); + } + long CScintilla::FindText(int flags, TextToFind* ft) { *************** *** 1136,1142 **** } ! void CScintilla::FormatRange(BOOL draw, long fr) { ! SPerform(SCI_FORMATRANGE, (long)draw, fr); } --- 1146,1152 ---- } ! long CScintilla::FormatRange(BOOL draw, long fr) { ! return (long)SPerform(SCI_FORMATRANGE, (long)draw, fr); } Index: scintillaif.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/scintillaif.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** scintillaif.h 7 Dec 2003 17:06:11 -0000 1.8 --- scintillaif.h 19 Feb 2004 07:39:34 -0000 1.9 *************** *** 773,776 **** --- 773,784 ---- */ int GetPrintColourMode(); + /** + * Set the printer wrap mode. + */ + void SetPrintWrapMode(int mode); + /** + * Get the printers wrap mode. + */ + int GetPrintWrapMode(); /** * Find some text in the document. *************** *** 780,784 **** * On Windows will draw the document into a display context such as a printer. */ ! void FormatRange(BOOL draw, long fr); /** * Retrieve the line at the top of the display. --- 788,792 ---- * On Windows will draw the document into a display context such as a printer. */ ! long FormatRange(BOOL draw, long fr); /** * Retrieve the line at the top of the display. |
From: <moo...@us...> - 2004-02-18 07:21:53
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3910 Modified Files: AnyEdit.rc FontPref.cpp FontPref.h Log Message: Font Preferences Bug Fix - ComboBox didn't show list on W2K. - Changes ComboBox style to Drop List instead of Drop Down - Sample Text didn't show the font sample, wasn't implemented. - ApplyToAllStyles didn't enable Apply button. - Selecting a string in the Fontname listbox didn't search the whole list. - Stylenumber and ComboBox index were used wrongly wich could corrupt the syntax files. Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** AnyEdit.rc 12 Feb 2004 13:05:50 -0000 1.30 --- AnyEdit.rc 18 Feb 2004 07:12:24 -0000 1.31 *************** *** 1335,1340 **** FONT 8, "MS Sans Serif" BEGIN ! EDITTEXT IDC_EDIT_FONTNAME,24,34,142,16,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT_FONTSIZE,174,34,69,16,ES_AUTOHSCROLL LISTBOX IDC_LIST_FONTNAME,24,49,142,78,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | --- 1335,1340 ---- FONT 8, "MS Sans Serif" BEGIN ! EDITTEXT IDC_EDIT_FONTNAME,24,34,142,13,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT_FONTSIZE,174,34,69,13,ES_AUTOHSCROLL LISTBOX IDC_LIST_FONTNAME,24,49,142,78,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | *************** *** 1353,1358 **** CTEXT "Sample Text",IDC_SAMPLE_TEXT,29,141,132,26, SS_CENTERIMAGE | SS_SUNKEN ! COMBOBOX IDC_COMBO_STYLE,46,17,120,16,CBS_DROPDOWN | WS_VSCROLL | ! WS_TABSTOP LTEXT "Style",IDC_STATIC_STYLE,26,18,16,9 PUSHBUTTON "Apply to all Styles",IDC_BUTTON_TOALLSTYLES,174,16,70, --- 1353,1358 ---- CTEXT "Sample Text",IDC_SAMPLE_TEXT,29,141,132,26, SS_CENTERIMAGE | SS_SUNKEN ! COMBOBOX IDC_COMBO_STYLE,46,17,120,96,CBS_DROPDOWNLIST | ! WS_VSCROLL | WS_TABSTOP LTEXT "Style",IDC_STATIC_STYLE,26,18,16,9 PUSHBUTTON "Apply to all Styles",IDC_BUTTON_TOALLSTYLES,174,16,70, *************** *** 1362,1366 **** IDD_PREF_COLOR DIALOGEX 0, 0, 295, 193 STYLE WS_CHILD ! FONT 8, "MS Sans Serif" BEGIN PUSHBUTTON "Button1",IDC_CBUTTON_FORE,143,31,127,13 --- 1362,1366 ---- IDD_PREF_COLOR DIALOGEX 0, 0, 295, 193 STYLE WS_CHILD ! FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN PUSHBUTTON "Button1",IDC_CBUTTON_FORE,143,31,127,13 Index: FontPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FontPref.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FontPref.cpp 12 Feb 2004 13:05:50 -0000 1.4 --- FontPref.cpp 18 Feb 2004 07:12:25 -0000 1.5 *************** *** 164,167 **** --- 164,168 ---- m_ComboStyle.SetCurSel(0); OnSelectChangeComboStyle(); + UpdateSampleText(); return TRUE; // return TRUE unless you set the focus to a control *************** *** 202,219 **** // Set Font name and size ! mapFontName.Lookup( m_ComboStyle.GetCurSel(), szTemp ); m_ListFontName.SelectString( 0, szTemp ); m_EditFontName.SetWindowText( szTemp ); ! mapFontSize.Lookup( m_ComboStyle.GetCurSel(), szTemp ); m_ListFontSize.SelectString( 0, szTemp ); m_EditFontSize.SetWindowText( szTemp ); // Set the check boxes. ! mapBold.Lookup( m_ComboStyle.GetCurSel(), bCheck ); m_Bold.SetCheck( bCheck ); ! mapItalic.Lookup( m_ComboStyle.GetCurSel(), bCheck ); m_Italic.SetCheck( bCheck ); ! mapUnderline.Lookup( m_ComboStyle.GetCurSel(), bCheck ); m_Underline.SetCheck( bCheck ); } --- 203,220 ---- // Set Font name and size ! mapFontName.Lookup( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), szTemp ); m_ListFontName.SelectString( 0, szTemp ); m_EditFontName.SetWindowText( szTemp ); ! mapFontSize.Lookup( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), szTemp ); m_ListFontSize.SelectString( 0, szTemp ); m_EditFontSize.SetWindowText( szTemp ); // Set the check boxes. ! mapBold.Lookup( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), bCheck ); m_Bold.SetCheck( bCheck ); ! mapItalic.Lookup( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), bCheck ); m_Italic.SetCheck( bCheck ); ! mapUnderline.Lookup( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), bCheck ); m_Underline.SetCheck( bCheck ); } *************** *** 223,230 **** CWnd* wnd; CString szFontName; m_EditFontName.GetWindowText( szFontName ); if( !szFontName.IsEmpty() ) { ! if( LB_ERR == m_ListFontName.SelectString( 0, szFontName ) ) { m_ListFontName.SetCurSel( -1 ); --- 224,233 ---- CWnd* wnd; CString szFontName; + CString szListFontName; + m_EditFontName.GetWindowText( szFontName ); if( !szFontName.IsEmpty() ) { ! if( LB_ERR == m_ListFontName.SelectString( -1, szFontName ) ) { m_ListFontName.SetCurSel( -1 ); *************** *** 232,236 **** else { - CString szListFontName; m_ListFontName.GetText( m_ListFontName.GetCurSel(), szListFontName ); if( szListFontName.GetLength() > szFontName.GetLength() ) --- 235,238 ---- *************** *** 242,246 **** // Store the new selected font name m_EditFontName.GetWindowText( szFontName ); ! mapFontName.SetAt( m_ComboStyle.GetCurSel(), szFontName ); // Tell the parent something changed, so the apply button can be activated --- 244,251 ---- // Store the new selected font name m_EditFontName.GetWindowText( szFontName ); ! mapFontName.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), szFontName ); ! ! // Update Sample Text ! UpdateSampleText(); // Tell the parent something changed, so the apply button can be activated *************** *** 256,259 **** --- 261,266 ---- CWnd* wnd; CString szFontSize; + CString szListFontSize; + m_EditFontSize.GetWindowText( szFontSize ); if( !szFontSize.IsEmpty() ) *************** *** 265,279 **** else { ! CString szListSize; ! m_ListFontSize.GetText( m_ListFontSize.GetCurSel(), szListSize ); ! if( szListSize.GetLength() > szFontSize.GetLength() ) { // Complete the fontsize and select the remaining chatacters. ! m_EditFontSize.SetWindowText( szListSize ); m_EditFontSize.SetSel( szFontSize.GetLength(), -1 ); // Store the new selected size m_EditFontSize.GetWindowText( szFontSize ); ! mapFontSize.SetAt( m_ComboStyle.GetCurSel(), szFontSize ); // Tell the parent something changed, so the apply button can be activated --- 272,288 ---- else { ! m_ListFontSize.GetText( m_ListFontSize.GetCurSel(), szListFontSize ); ! if( szListFontSize.GetLength() > szFontSize.GetLength() ) { // Complete the fontsize and select the remaining chatacters. ! m_EditFontSize.SetWindowText( szListFontSize ); m_EditFontSize.SetSel( szFontSize.GetLength(), -1 ); // Store the new selected size m_EditFontSize.GetWindowText( szFontSize ); ! mapFontSize.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), szFontSize ); ! ! // Update Sample Text ! UpdateSampleText(); // Tell the parent something changed, so the apply button can be activated *************** *** 295,298 **** --- 304,310 ---- m_EditFontName.SetWindowText( szFontName ); + // Update Sample Text + UpdateSampleText(); + // Tell the parent something changed, so the apply button can be activated wnd = GetParentOwner(); *************** *** 311,314 **** --- 323,329 ---- m_EditFontSize.SetWindowText( szFontSize ); + // Update Sample Text + UpdateSampleText(); + // Tell the parent something changed, so the apply button can be activated wnd = GetParentOwner(); *************** *** 324,327 **** --- 339,345 ---- mapBold.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Bold.GetCheck() ); + // Update Sample Text + UpdateSampleText(); + // Tell the parent something changed, so the apply button can be activated wnd = GetParentOwner(); *************** *** 336,339 **** --- 354,360 ---- mapItalic.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Italic.GetCheck() ); + // Update Sample Text + UpdateSampleText(); + // Tell the parent something changed, so the apply button can be activated wnd = GetParentOwner(); *************** *** 348,351 **** --- 369,375 ---- mapUnderline.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Underline.GetCheck() ); + // Update Sample Text + UpdateSampleText(); + // Tell the parent something changed, so the apply button can be activated wnd = GetParentOwner(); *************** *** 355,358 **** --- 379,383 ---- void CFontPref::OnButtonToAllStyles() { + CWnd* wnd; int iCount; int iStyleNumber; *************** *** 385,389 **** mapUnderline.SetAt( iStyleNumber, bUnderline ); } ! MessageBox( "All styles have been set to currrent font selection." ); } --- 410,418 ---- mapUnderline.SetAt( iStyleNumber, bUnderline ); } ! MessageBox( "All styles have been set to the currrent font selection.", "Information" ); ! ! // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } *************** *** 420,421 **** --- 449,470 ---- } } + + void CFontPref::UpdateSampleText() + { + CString szListFontName; + CString szListFontSize; + + // Get the fontname and fontsize from the listboxes + m_ListFontName.GetText( m_ListFontName.GetCurSel(), szListFontName ); + m_ListFontSize.GetText( m_ListFontSize.GetCurSel(), szListFontSize ); + + // Detacht the previously created font + m_fontSampleText.Detach(); + + // Add 5 to see the actual size in the sample text, don't know why it's + // smaller, but it works. + m_fontSampleText.CreateFont( atoi( szListFontSize ) + 5, 0, 0, 0, m_Bold.GetCheck() ? FW_BOLD : FW_NORMAL, m_Italic.GetCheck(), m_Underline.GetCheck(), 0, DEFAULT_CHARSET, OUT_CHARACTER_PRECIS, CLIP_CHARACTER_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, szListFontName ); + + // Change the font of the Sample Text + m_SampleText.SetFont( &m_fontSampleText ); + } Index: FontPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FontPref.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FontPref.h 12 Feb 2004 13:05:50 -0000 1.4 --- FontPref.h 18 Feb 2004 07:12:25 -0000 1.5 *************** *** 61,64 **** --- 61,66 ---- protected: + CFont m_fontSampleText; + void UpdateSampleText(); // Generated message map functions |
From: <td...@us...> - 2004-02-18 04:52:51
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12923 Modified Files: AnyEdit.cpp ChangeLog.txt ColorPref.cpp SciLexer.h Scintilla.h Log Message: - Minor fixes - Scintilla related files updated to version 1.58 Index: AnyEdit.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** AnyEdit.cpp 12 Feb 2004 13:05:50 -0000 1.40 --- AnyEdit.cpp 18 Feb 2004 04:43:27 -0000 1.41 *************** *** 254,259 **** // Check if the users config directory structure exists ! CString szDirName; ! szDirName = CONFIG_DIR; if( _mkdir( szDirName ) && errno != EEXIST ) return false; szDirName += szUserName; --- 254,259 ---- // Check if the users config directory structure exists ! CString szDirName=GetAppPath(); ! szDirName += CONFIG_DIR; if( _mkdir( szDirName ) && errno != EEXIST ) return false; szDirName += szUserName; *************** *** 264,268 **** // Read config file ! if( !ReadConfigFile() ) return false; // The main window has been initialized, so show and update it. --- 264,272 ---- // Read config file ! if( !ReadConfigFile() ) ! { ! AfxMessageBox("Could not read AnyEdit config Files\nPlease reinstall AnyEdit"); ! return false; ! } // The main window has been initialized, so show and update it. *************** *** 527,536 **** sCredits += "M.Deepak|(de...@an...)|||"; ! sCredits += "Project Maintainer\r||"; sCredits += "Stanimir Kabaivanov|(kab...@ma...)|||"; sCredits += "Developer\r||"; sCredits += "Leon Wennekers|(moo...@so...)|||"; ! sCredits += "Additional Contributors\r||"; sCredits += "Mike Loolard|"; --- 531,540 ---- sCredits += "M.Deepak|(de...@an...)|||"; ! sCredits += "Project Maintainer\r||"; sCredits += "Stanimir Kabaivanov|(kab...@ma...)|||"; sCredits += "Developer\r||"; sCredits += "Leon Wennekers|(moo...@so...)|||"; ! sCredits += "Additional Contributors\r||"; sCredits += "Mike Loolard|"; *************** *** 1722,1727 **** { CString szUserFileName; ! ! szUserFileName = CONFIG_DIR; szUserFileName += szUserName; szUserFileName += '\\'; --- 1726,1731 ---- { CString szUserFileName; ! szUserFileName = GetAppPath(); ! szUserFileName += CONFIG_DIR; szUserFileName += szUserName; szUserFileName += '\\'; *************** *** 1730,1738 **** if( !ConfigFile.Parse() ) { ! // User hasn't got a config file. CString szDefaultFileName; // First get the Default config file. ! szDefaultFileName = CONFIG_DIR; szDefaultFileName += DEFAULT_DIR; szDefaultFileName += ANYEDIT_CONFIG_FILE; --- 1734,1743 ---- if( !ConfigFile.Parse() ) { ! // User hasn't got a config file. CString szDefaultFileName; // First get the Default config file. ! szDefaultFileName = GetAppPath(); ! szDefaultFileName += CONFIG_DIR; szDefaultFileName += DEFAULT_DIR; szDefaultFileName += ANYEDIT_CONFIG_FILE; *************** *** 1834,1838 **** // Get the filename of the Syntax file ! szFileName = CONFIG_DIR; szFileName += szUserName; szFileName += '\\'; --- 1839,1844 ---- // Get the filename of the Syntax file ! szFileName = GetAppPath(); ! szFileName += CONFIG_DIR; szFileName += szUserName; szFileName += '\\'; *************** *** 1845,1850 **** { // The username file doesn't exist read the default ! CString szDefaultFileName; ! szDefaultFileName = CONFIG_DIR; szDefaultFileName += DEFAULT_DIR; szDefaultFileName += SYNTAX_DIR; --- 1851,1856 ---- { // The username file doesn't exist read the default ! CString szDefaultFileName=GetAppPath(); ! szDefaultFileName += CONFIG_DIR; szDefaultFileName += DEFAULT_DIR; szDefaultFileName += SYNTAX_DIR; Index: ChangeLog.txt =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ChangeLog.txt,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** ChangeLog.txt 7 Dec 2003 17:06:11 -0000 1.34 --- ChangeLog.txt 18 Feb 2004 04:43:27 -0000 1.35 *************** *** 6,9 **** --- 6,12 ---- 1) Added macro support 2) Added document position saving support + 3) New syntax file implementation + 4) Preferences changes - Color/Font and Apply button addition + Index: ColorPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ColorPref.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ColorPref.cpp 12 Feb 2004 13:05:50 -0000 1.4 --- ColorPref.cpp 18 Feb 2004 04:43:27 -0000 1.5 *************** *** 214,218 **** // Build the filename of the Default Syntax file ! szDefaultFileName = CONFIG_DIR; szDefaultFileName += DEFAULT_DIR; szDefaultFileName += SYNTAX_DIR; --- 214,219 ---- // Build the filename of the Default Syntax file ! szDefaultFileName = theApp.GetAppPath(); ! szDefaultFileName += CONFIG_DIR; szDefaultFileName += DEFAULT_DIR; szDefaultFileName += SYNTAX_DIR; Index: SciLexer.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SciLexer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SciLexer.h 21 Nov 2003 13:53:00 -0000 1.4 --- SciLexer.h 18 Feb 2004 04:43:27 -0000 1.5 *************** *** 68,71 **** --- 68,73 ---- #define SCLEX_POWERBASIC 51 #define SCLEX_FORTH 52 + #define SCLEX_ERLANG 53 + #define SCLEX_OCTAVE 54 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 *************** *** 252,255 **** --- 254,261 ---- #define SCE_B_IDENTIFIER 7 #define SCE_B_DATE 8 + #define SCE_B_STRINGEOL 9 + #define SCE_B_KEYWORD2 10 + #define SCE_B_KEYWORD3 11 + #define SCE_B_KEYWORD4 12 #define SCE_PROPS_DEFAULT 0 #define SCE_PROPS_COMMENT 1 *************** *** 299,302 **** --- 305,310 ---- #define SCE_ERR_ELF 15 #define SCE_ERR_IFC 16 + #define SCE_ERR_IFORT 17 + #define SCE_ERR_ABSF 18 #define SCE_BAT_DEFAULT 0 #define SCE_BAT_COMMENT 1 *************** *** 417,420 **** --- 425,429 ---- #define SCE_MATLAB_OPERATOR 6 #define SCE_MATLAB_IDENTIFIER 7 + #define SCE_MATLAB_DOUBLEQUOTESTRING 8 #define SCE_SCRIPTOL_DEFAULT 0 #define SCE_SCRIPTOL_WHITE 1 *************** *** 610,613 **** --- 619,637 ---- #define SCE_METAPOST_TEXT 5 #define SCE_METAPOST_EXTRA 6 + #define SCE_ERLANG_DEFAULT 0 + #define SCE_ERLANG_COMMENT 1 + #define SCE_ERLANG_VARIABLE 2 + #define SCE_ERLANG_NUMBER 3 + #define SCE_ERLANG_KEYWORD 4 + #define SCE_ERLANG_STRING 5 + #define SCE_ERLANG_OPERATOR 6 + #define SCE_ERLANG_ATOM 7 + #define SCE_ERLANG_FUNCTION_NAME 8 + #define SCE_ERLANG_CHARACTER 9 + #define SCE_ERLANG_MACRO 10 + #define SCE_ERLANG_RECORD 11 + #define SCE_ERLANG_SEPARATOR 12 + #define SCE_ERLANG_NODE_NAME 13 + #define SCE_ERLANG_UNKNOWN 31 //--Autogenerated -- end of section automatically generated from Scintilla.iface Index: Scintilla.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/Scintilla.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Scintilla.h 21 Nov 2003 13:53:00 -0000 1.7 --- Scintilla.h 18 Feb 2004 04:43:27 -0000 1.8 *************** *** 560,563 **** --- 560,574 ---- #define SCI_PAGEUPRECTEXTEND 2433 #define SCI_PAGEDOWNRECTEXTEND 2434 + #define SCI_STUTTEREDPAGEUP 2435 + #define SCI_STUTTEREDPAGEUPEXTEND 2436 + #define SCI_STUTTEREDPAGEDOWN 2437 + #define SCI_STUTTEREDPAGEDOWNEXTEND 2438 + #define SCI_WORDLEFTEND 2439 + #define SCI_WORDLEFTENDEXTEND 2440 + #define SCI_WORDRIGHTEND 2441 + #define SCI_WORDRIGHTENDEXTEND 2442 + #define SCI_SETWHITESPACECHARS 2443 + #define SCI_SETCHARSDEFAULT 2444 + #define SCI_AUTOCGETCURRENT 2445 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 |
From: <moo...@us...> - 2004-02-12 13:10:51
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20664 Modified Files: AnyEdit.cpp AnyEdit.h AnyEdit.rc AnyEditDoc.cpp ColorPref.cpp ColorPref.h FontPref.cpp FontPref.h MainFrm.cpp SAPrefsDialog.cpp SAPrefsDialog.h SAPrefsSubDlg.h SyntaxFile.cpp SyntaxFile.h resource.h Log Message: Preferences Update Color and Font Preferences can now be set for every supported Language Syntax. - SyntaxFile: Added GetFilename() - SyntaxFile: SetStyleFontName() param changed to char* - SAPrefsSubDialog.h: Added WM_PREFERENCES_CHANGED - CMainFrame::OnConfigurePreferences: Moved preference dialog building to CSAPrefsDialog. Code cleanup. - ColorPref & FontPref: New design - SAPrefsDialog: Added Apply button. And a lot more to build and display the dialog and code for saving the preferences. Index: AnyEdit.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** AnyEdit.cpp 12 Dec 2003 11:00:04 -0000 1.39 --- AnyEdit.cpp 12 Feb 2004 13:05:50 -0000 1.40 *************** *** 1048,1052 **** { // m_sdefaults.LoadDefaults(); ! LoadLanguageExtensions(); POSITION lpos = langmap.GetStartPosition(); while(lpos!=NULL) --- 1048,1052 ---- { // m_sdefaults.LoadDefaults(); ! /* LoadLanguageExtensions(); POSITION lpos = langmap.GetStartPosition(); while(lpos!=NULL) *************** *** 1056,1060 **** langmap.GetNextAssoc(lpos,tstr,tlang); LoadLanguage(tstr); ! } POSITION pos = pDocTemplate->GetFirstDocPosition(); --- 1056,1060 ---- langmap.GetNextAssoc(lpos,tstr,tlang); LoadLanguage(tstr); ! }*/ POSITION pos = pDocTemplate->GetFirstDocPosition(); *************** *** 1071,1074 **** --- 1071,1075 ---- } + } Index: AnyEdit.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** AnyEdit.h 12 Dec 2003 11:00:04 -0000 1.33 --- AnyEdit.h 12 Feb 2004 13:05:50 -0000 1.34 *************** *** 205,216 **** BOOL ReadConfigFile(); - // Get a reference to the config file. Used in the Preferences dialogs - CConfigFile* GetConfigFile(); - // Fill the map with extensions and language numbers void FillExtensionMap(); ! public: // Load all the configured syntax files. void LoadSyntaxFiles(); // Get the SyntaxFile object by it's language number. --- 205,216 ---- BOOL ReadConfigFile(); // Fill the map with extensions and language numbers void FillExtensionMap(); ! // Load all the configured syntax files. void LoadSyntaxFiles(); + public: + // Get a reference to the config file. Used in the Preferences dialogs + CConfigFile* GetConfigFile(); // Get the SyntaxFile object by it's language number. Index: AnyEdit.rc =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.rc,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** AnyEdit.rc 7 Dec 2003 17:06:10 -0000 1.29 --- AnyEdit.rc 12 Feb 2004 13:05:50 -0000 1.30 *************** *** 1251,1256 **** FONT 8, "MS Sans Serif" BEGIN ! DEFPUSHBUTTON "&Ok",IDOK,217,214,53,15,BS_CENTER ! PUSHBUTTON "&Cancel",IDCANCEL,274,214,55,15 CONTROL "",IDC_DLG_FRAME,"Static",SS_GRAYFRAME,100,18,292,189 LTEXT "",IDC_CAPTION_BAR,100,5,291,12,SS_CENTERIMAGE --- 1251,1256 ---- FONT 8, "MS Sans Serif" BEGIN ! DEFPUSHBUTTON "&Ok",IDOK,158,215,53,15,BS_CENTER ! PUSHBUTTON "&Cancel",IDCANCEL,274,215,55,15 CONTROL "",IDC_DLG_FRAME,"Static",SS_GRAYFRAME,100,18,292,189 LTEXT "",IDC_CAPTION_BAR,100,5,291,12,SS_CENTERIMAGE *************** *** 1258,1263 **** TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,4,5,91,201 ! PUSHBUTTON "&Help",IDC_PHELP,334,214,50,15 GROUPBOX "",IDC_STATIC,3,206,389,27 END --- 1258,1264 ---- TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,4,5,91,201 ! PUSHBUTTON "&Help",IDC_PHELP,334,215,50,15 GROUPBOX "",IDC_STATIC,3,206,389,27 + PUSHBUTTON "&Apply",IDC_APPLY,216,215,53,15,BS_CENTER END *************** *** 1330,1359 **** END ! IDD_PREF_FONT DIALOG DISCARDABLE 0, 0, 295, 192 STYLE WS_CHILD FONT 8, "MS Sans Serif" BEGIN ! LTEXT "Font Sample",IDC_STATIC,7,8,110,10 ! PUSHBUTTON "Change Font",IDC_BUTTON1,192,158,79,12 ! EDITTEXT IDC_EDIT1,7,30,274,105,ES_MULTILINE | ES_READONLY | ! WS_VSCROLL END IDD_PREF_COLOR DIALOGEX 0, 0, 295, 193 STYLE WS_CHILD ! FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN ! LTEXT "Color Items",IDC_STATIC,7,7,114,11 ! PUSHBUTTON "Button1",IDC_CBUTTON_FORE,138,34,111,13 ! LTEXT "Fore Color",IDC_STATIC,137,22,100,9 ! LTEXT "Background Color",IDC_STATIC,139,58,74,9 ! PUSHBUTTON "Button2",IDC_CBUTTON_BACK,139,70,110,13 ! GROUPBOX "Sample Editor Area",IDC_STATIC,139,87,108,54 ! LISTBOX IDC_EDIT_LIST,7,24,113,136,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP,WS_EX_CLIENTEDGE ! PUSHBUTTON "Reset All Colors",IDC_BUTTON_RESETCOLORS,140,147,107,12 ! CTEXT "Sample Text",IDC_SAMPLE_TEXT,151,111,84,11, ! SS_CENTERIMAGE ! LTEXT "",IDC_BACKGROUND,146,101,94,31,SS_SUNKEN END --- 1331,1377 ---- END ! IDD_PREF_FONT DIALOG DISCARDABLE 0, 0, 294, 192 STYLE WS_CHILD FONT 8, "MS Sans Serif" BEGIN ! EDITTEXT IDC_EDIT_FONTNAME,24,34,142,16,ES_AUTOHSCROLL ! EDITTEXT IDC_EDIT_FONTSIZE,174,34,69,16,ES_AUTOHSCROLL ! LISTBOX IDC_LIST_FONTNAME,24,49,142,78,LBS_SORT | ! LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | ! WS_TABSTOP ! LISTBOX IDC_LIST_FONTSIZE,174,49,69,78,LBS_SORT | ! LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | ! WS_TABSTOP ! GROUPBOX "",IDC_STATIC,175,131,69,41 ! CONTROL "Bold",IDC_CHECK_BOLD,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,181,138,30,9 ! CONTROL "Italic",IDC_CHECK_ITALIC,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,181,149,30,10 ! CONTROL "Underline",IDC_CHECK_UNDERLINE,"Button",BS_AUTOCHECKBOX | ! WS_TABSTOP,181,160,46,9 ! GROUPBOX "Sample Text Area",IDC_STATIC,23,131,144,41 ! CTEXT "Sample Text",IDC_SAMPLE_TEXT,29,141,132,26, ! SS_CENTERIMAGE | SS_SUNKEN ! COMBOBOX IDC_COMBO_STYLE,46,17,120,16,CBS_DROPDOWN | WS_VSCROLL | ! WS_TABSTOP ! LTEXT "Style",IDC_STATIC_STYLE,26,18,16,9 ! PUSHBUTTON "Apply to all Styles",IDC_BUTTON_TOALLSTYLES,174,16,70, ! 14 END IDD_PREF_COLOR DIALOGEX 0, 0, 295, 193 STYLE WS_CHILD ! FONT 8, "MS Sans Serif" BEGIN ! PUSHBUTTON "Button1",IDC_CBUTTON_FORE,143,31,127,13 ! LTEXT "Foreground Color",IDC_STATIC,142,20,100,9 ! LTEXT "Background Color",IDC_STATIC,144,56,74,9 ! PUSHBUTTON "Button2",IDC_CBUTTON_BACK,144,68,126,13 ! GROUPBOX "Sample Editor Area",IDC_STATIC,144,85,126,54 ! LISTBOX IDC_EDIT_LIST,12,22,119,136,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP,WS_EX_CLIENTEDGE ! PUSHBUTTON "Reset All Colors",IDC_BUTTON_RESETCOLORS,153,145,107,12 ! CTEXT "Sample Text",IDC_SAMPLE_TEXT,154,97,105,33, ! SS_CENTERIMAGE | SS_SUNKEN END *************** *** 1898,1902 **** BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 281 TOPMARGIN, 7 BOTTOMMARGIN, 185 --- 1916,1920 ---- BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 290 TOPMARGIN, 7 BOTTOMMARGIN, 185 Index: AnyEditDoc.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEditDoc.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AnyEditDoc.cpp 12 Dec 2003 11:00:04 -0000 1.14 --- AnyEditDoc.cpp 12 Feb 2004 13:05:50 -0000 1.15 *************** *** 195,209 **** void CAnyEditDoc::ReloadDefaults() { - /* theApp.SetDefaults(m_pScintilla); - if(m_pScintilla) - { - if(m_pDocLang) - { - m_pDocLang->FillUpScintilla(m_pScintilla); - } - } - theApp.ApplyOtherDefaults(m_pScintilla);*/ SetScintillaProperties(); ! m_pScintilla->Colourise( 0, -1 ); } --- 195,200 ---- void CAnyEditDoc::ReloadDefaults() { SetScintillaProperties(); ! UpdateAllViews( NULL ); } Index: ColorPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ColorPref.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ColorPref.cpp 8 May 2003 12:00:56 -0000 1.3 --- ColorPref.cpp 12 Feb 2004 13:05:50 -0000 1.4 *************** *** 45,62 **** { //{{AFX_DATA_INIT(CColorPref) ! //}}AFX_DATA_INIT } - void CColorPref::DoDataExchange(CDataExchange* pDX) { CSAPrefsSubDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CColorPref) - DDX_Control(pDX, IDC_BACKGROUND, m_back); DDX_Control(pDX, IDC_SAMPLE_TEXT, m_sample); DDX_Control(pDX, IDC_EDIT_LIST, m_colorList); DDX_Control(pDX, IDC_CBUTTON_BACK, m_backcbutton); DDX_Control(pDX, IDC_CBUTTON_FORE, m_forecbutton); ! //}}AFX_DATA_MAP } --- 45,62 ---- { //{{AFX_DATA_INIT(CColorPref) ! //}}AFX_DATA_INIT ! iNrOfStyles = 0; ! iLastSelected = -1; } void CColorPref::DoDataExchange(CDataExchange* pDX) { CSAPrefsSubDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CColorPref) DDX_Control(pDX, IDC_SAMPLE_TEXT, m_sample); DDX_Control(pDX, IDC_EDIT_LIST, m_colorList); DDX_Control(pDX, IDC_CBUTTON_BACK, m_backcbutton); DDX_Control(pDX, IDC_CBUTTON_FORE, m_forecbutton); ! //}}AFX_DATA_MAP } *************** *** 65,71 **** //{{AFX_MSG_MAP(CColorPref) ON_WM_CREATE() ! ON_LBN_SELCHANGE(IDC_EDIT_LIST, OnSelchangeColorList) ! ON_MESSAGE(CPN_SELENDOK,OnBackColorChange) ! ON_BN_CLICKED(IDC_BUTTON_RESETCOLORS, OnButtonResetcolors) //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 65,71 ---- //{{AFX_MSG_MAP(CColorPref) ON_WM_CREATE() ! ON_LBN_SELCHANGE(IDC_EDIT_LIST, OnChangeColorList) ! ON_MESSAGE(CPN_SELENDOK,OnColorChange) ! ON_BN_CLICKED(IDC_BUTTON_RESETCOLORS, OnResetAllColors) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 84,167 **** BOOL CColorPref::OnInitDialog() { CSAPrefsSubDlg::OnInitDialog(); - m_colorList.AddString(_T("Text")); - m_colorList.AddString(_T("Line Number")); - m_colorList.AddString(_T("Brace Matching")); - m_colorList.AddString(_T("Highlighted Line")); - m_colorList.AddString(_T("Bookmark")); - m_colorList.AddString(_T("Selection")); - m_colorList.AddString(_T("Indentation")); - m_colorList.AddString(_T("CommentBox")); - m_colorList.AddString(_T("CommentLine")); - m_colorList.AddString(_T("CommentDoc")); - m_colorList.AddString(_T("Keywords")); - m_colorList.AddString(_T("Numbers")); - m_colorList.AddString(_T("Operator")); - m_colorList.AddString(_T("Char")); - m_colorList.AddString(_T("Strings")); - m_colorList.AddString(_T("Error")); - m_colorList.AddString(_T("Preprocessor")); ! m_back.SetBkColor(RGB(255,255,255)); - m_sample.SetTextColor(m_forecbutton.Color); m_colorList.SetCurSel(0); ! OnSelchangeColorList(); ! return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } ! void CColorPref::OnSelchangeColorList() { ! CString tempStr; ! m_colorList.GetText(m_colorList.GetCurSel(),tempStr); ! m_forecbutton.EnableWindow(); ! m_backcbutton.EnableWindow(); ! m_forecbutton.Color = m_reg.GetProfileInt(KEY_COLS,_T(tempStr),1111); ! m_backcbutton.Color = m_reg.GetProfileInt(KEY_COLS,_T(tempStr+"bk"),1111); ! //if(m_forecbutton.Color==1111) m_forecbutton.EnableWindow(FALSE); ! //if(m_backcbutton.Color==1111) m_backcbutton.EnableWindow(FALSE); ! m_sample.SetBkColor(m_backcbutton.Color); ! m_sample.SetTextColor(m_forecbutton.Color); ! m_sample.SetWindowText(tempStr); ! if(m_backcbutton.Color==1111) ! m_sample.SetBkColor(16777215); ! if(m_forecbutton.Color==1111) ! m_sample.SetTextColor(16777215); ! m_sample.UpdateWindow(); } ! LONG CColorPref::OnBackColorChange(UINT /*lParam*/, LONG /*wParam*/) { ! CString tempStr; ! m_colorList.GetText(m_colorList.GetCurSel(),tempStr); ! if(m_forecbutton.IsWindowEnabled()) ! m_reg.WriteProfileInt(KEY_COLS,_T(tempStr),m_forecbutton.Color); ! else ! m_reg.WriteProfileInt(KEY_COLS,_T(tempStr),1111); ! if(m_backcbutton.IsWindowEnabled()) ! m_reg.WriteProfileInt(KEY_COLS,_T(tempStr+"bk"),m_backcbutton.Color); ! else ! m_reg.WriteProfileInt(KEY_COLS,_T(tempStr+"bk"),1111); - OnSelchangeColorList(); return TRUE; } ! void CColorPref::OnButtonResetcolors() { ! if(MessageBox(_T("All your color customizations will be lost ! Are you sure ?"),_T("Resetting color customizations"),MB_YESNO)==6) { ! m_reg.WriteProfileInt(KEY_COLS,_T("FirstTime"),0); ! theApp.ResetAllProperties(); } } --- 84,290 ---- BOOL CColorPref::OnInitDialog() { + int iCount; + int iColor; CSAPrefsSubDlg::OnInitDialog(); ! // Let's read all the style from the syntax file ! iNrOfStyles = 0; ! for( iCount = 0; iCount < STYLE_MAX; ++ iCount ) ! { ! CString szStyleName = m_pSyntaxFile->GetStyleName( iCount ); ! if( !szStyleName.IsEmpty() ) ! { ! m_colorList.InsertString( iNrOfStyles, szStyleName ); ! m_colorList.SetItemData( iNrOfStyles, iCount ); ! iColor = m_pSyntaxFile->GetStyleColorForeground( iCount ); ! if( -1 == iColor ) iColor = 0; ! m_ForegroundColors.SetAt( iCount, iColor ); ! iColor = m_pSyntaxFile->GetStyleColorBackground( iCount ); ! if( -1 == iColor ) iColor = 0; ! m_BackgroundColors.SetAt( iCount, iColor ); ! ++ iNrOfStyles; ! } ! } m_colorList.SetCurSel(0); ! ! OnChangeColorList(); ! ! return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } ! void CColorPref::OnChangeColorList() { ! CString szStyleName; ! int iStyleNumber; ! int iColor; ! // If the last selected is the same as the current selected ! // we do nothing, coz nothing changed ! if( iLastSelected != m_colorList.GetCurSel() ) ! { ! // If there wasn't an item selected before, we don't need to save information. ! if( -1 != iLastSelected ) ! { ! // Get the style number of the last selected item. ! iStyleNumber = m_colorList.GetItemData( iLastSelected ); ! // Save the colors of the last selected item in the map ! m_ForegroundColors.SetAt( iStyleNumber, m_forecbutton.Color ); ! m_BackgroundColors.SetAt( iStyleNumber, m_backcbutton.Color ); ! } ! // Get the style number of the newly selected item. ! iStyleNumber = m_colorList.GetItemData( m_colorList.GetCurSel() ); ! ! // Set the colors to the new selected item from the map. ! m_ForegroundColors.Lookup( m_colorList.GetItemData( m_colorList.GetCurSel() ), iColor ); ! m_forecbutton.Color = iColor; ! m_BackgroundColors.Lookup( m_colorList.GetItemData( m_colorList.GetCurSel() ), iColor ); ! m_backcbutton.Color = iColor; ! // Make sure the color buttons are enabled. ! m_forecbutton.EnableWindow(); ! m_backcbutton.EnableWindow(); ! // Set the last selected item ! iLastSelected = m_colorList.GetCurSel(); + // Update the sample box + UpdateColorSample(); + } } ! LONG CColorPref::OnColorChange(UINT /*lParam*/, LONG /*wParam*/) { ! CWnd* wnd; ! int iStyleNumber; ! // Get the style number of the last selected item. ! iStyleNumber = m_colorList.GetItemData( iLastSelected ); ! // Save the colors of the last selected item in the map ! m_ForegroundColors.SetAt( iStyleNumber, m_forecbutton.Color ); ! m_BackgroundColors.SetAt( iStyleNumber, m_backcbutton.Color ); ! ! UpdateColorSample(); ! ! // Tell the parent something changed, so the apply button can be activated ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); return TRUE; } ! void CColorPref::UpdateColorSample() { ! CString szStyleName; ! ! // Change to colors of the sample to the colors of the selected style. ! m_sample.SetBkColor( m_backcbutton.Color ); ! m_sample.SetTextColor( m_forecbutton.Color ); ! ! // Set the window text to the name of the style. ! m_colorList.GetText( m_colorList.GetCurSel(),szStyleName ); ! m_sample.SetWindowText( szStyleName ); ! ! // Update the controls. ! m_sample.UpdateWindow(); ! } ! ! void CColorPref::OnResetAllColors() ! { ! int iStart; ! int iEnd; ! int iCount; ! int iColor; ! CWnd* wnd; ! CString szDefaultFileName; ! CString szFileName; ! CSyntaxFile* pSyntaxFile; ! ! pSyntaxFile = NULL; ! ! if( MessageBox(_T("All your color customizations will be lost ! Are you sure ?"),_T("Resetting color customizations"),MB_YESNO) == 6 ) { ! pSyntaxFile = new CSyntaxFile(); ! if( NULL == pSyntaxFile ) return; // throw memory exception! ! ! // Build the filename of the Default Syntax file ! szDefaultFileName = CONFIG_DIR; ! szDefaultFileName += DEFAULT_DIR; ! szDefaultFileName += SYNTAX_DIR; ! ! szFileName = m_pSyntaxFile->GetFilename(); ! iStart = 0; ! iEnd = 0; ! ! // We have to determine the syntax file name without the path, to add to the default path. ! while( iEnd >= 0 ) ! { ! iEnd = szFileName.Find( '\\', iStart ); ! if( -1 == iEnd ) ! { ! // We found the filename, cut it ! szDefaultFileName += szFileName.Right( szFileName.GetLength() - iStart ); ! } ! iStart = iEnd + 1; ! } ! pSyntaxFile->SetFilename( szDefaultFileName ); ! ! // Read the syntax definitions from the file. ! if( !pSyntaxFile->Parse() ) ! { ! delete pSyntaxFile; ! return; ! } ! ! // Read the colors from the default syn file. ! for( iCount = 0; iCount < STYLE_MAX; ++ iCount ) ! { ! iColor = pSyntaxFile->GetStyleColorForeground( iCount ); ! if( -1 == iColor ) iColor = 0; ! m_ForegroundColors.SetAt( iCount, iColor ); ! iColor = pSyntaxFile->GetStyleColorBackground( iCount ); ! if( -1 == iColor ) iColor = 0; ! m_BackgroundColors.SetAt( iCount, iColor ); ! } ! ! // Reset last selected, so the visible color isn't saved; ! iLastSelected = -1; ! OnChangeColorList(); ! wnd = GetParentOwner(); ! if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); } + if( NULL != pSyntaxFile ) delete pSyntaxFile; + } + + void CColorPref::SetSyntaxFile( CSyntaxFile* lpSyntaxFile ) + { + m_pSyntaxFile = lpSyntaxFile; + } + + void CColorPref::SaveChanges() + { + // Read all data from the boxes and put it in the SyntaxFile. + int iCount; + int iColor; + int iStyleNumber; + POSITION pos; + + pos = m_ForegroundColors.GetStartPosition(); + for( iCount = 0; iCount < m_ForegroundColors.GetCount(); ++ iCount ) + { + m_ForegroundColors.GetNextAssoc( pos, iStyleNumber, iColor ); + m_pSyntaxFile->SetStyleColorForeground( iStyleNumber, iColor ); + } + + pos = m_BackgroundColors.GetStartPosition(); + for( iCount = 0; iCount < m_BackgroundColors.GetCount(); ++ iCount ) + { + m_BackgroundColors.GetNextAssoc( pos, iStyleNumber, iColor ); + m_pSyntaxFile->SetStyleColorBackground( iStyleNumber, iColor ); + } } Index: ColorPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/ColorPref.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ColorPref.h 8 May 2003 12:00:56 -0000 1.2 --- ColorPref.h 12 Feb 2004 13:05:50 -0000 1.3 *************** *** 14,17 **** --- 14,18 ---- #include "RegProfile.h" #include "ColorStatic.h" + #include "SyntaxFile.h" class CColorPref : public CSAPrefsSubDlg *************** *** 23,36 **** // Dialog Data //{{AFX_DATA(CColorPref) ! enum { IDD = IDD_PREF_COLOR }; ! CColorStatic m_back; CColorStatic m_sample; CListBox m_colorList; CColorButton m_backcbutton; CColorButton m_forecbutton; ! //}}AFX_DATA ! void saveColors(); protected: ! CRegProfile m_reg; // Overrides // ClassWizard generated virtual function overrides --- 24,36 ---- // Dialog Data //{{AFX_DATA(CColorPref) ! enum { IDD = IDD_PREF_COLOR }; CColorStatic m_sample; CListBox m_colorList; CColorButton m_backcbutton; CColorButton m_forecbutton; ! //}}AFX_DATA ! // void saveColors(); protected: ! // CRegProfile m_reg; // Overrides // ClassWizard generated virtual function overrides *************** *** 41,52 **** // Implementation protected: // Generated message map functions //{{AFX_MSG(CColorPref) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); virtual BOOL OnInitDialog(); ! afx_msg void OnSelchangeColorList(); ! afx_msg LONG OnBackColorChange(UINT lParam, LONG wParam); ! afx_msg void OnButtonResetcolors(); //}}AFX_MSG DECLARE_MESSAGE_MAP() --- 41,64 ---- // Implementation protected: + CSyntaxFile* m_pSyntaxFile; + int iNrOfStyles; + int iLastSelected; + CMap<int, int, int, int> m_ForegroundColors; + CMap<int, int, int, int> m_BackgroundColors; + + void UpdateColorSample(); + + public: + void SetSyntaxFile( CSyntaxFile* lpSyntaxFile ); + void SaveChanges(); + protected: // Generated message map functions //{{AFX_MSG(CColorPref) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); virtual BOOL OnInitDialog(); ! afx_msg void OnChangeColorList(); ! afx_msg LONG OnColorChange(UINT lParam, LONG wParam); ! afx_msg void OnResetAllColors(); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: FontPref.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FontPref.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FontPref.cpp 8 May 2003 12:00:56 -0000 1.3 --- FontPref.cpp 12 Feb 2004 13:05:50 -0000 1.4 *************** *** 46,50 **** { //{{AFX_DATA_INIT(CFontPref) ! //}}AFX_DATA_INIT } --- 46,50 ---- { //{{AFX_DATA_INIT(CFontPref) ! //}}AFX_DATA_INIT } *************** *** 53,58 **** CSAPrefsSubDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CFontPref) ! DDX_Control(pDX, IDC_EDIT1, m_edit); ! //}}AFX_DATA_MAP } --- 53,66 ---- CSAPrefsSubDlg::DoDataExchange(pDX); //{{AFX_DATA_MAP(CFontPref) ! DDX_Control(pDX, IDC_CHECK_UNDERLINE, m_Underline); ! DDX_Control(pDX, IDC_CHECK_ITALIC, m_Italic); ! DDX_Control(pDX, IDC_CHECK_BOLD, m_Bold); ! DDX_Control(pDX, IDC_EDIT_FONTNAME, m_EditFontName); ! DDX_Control(pDX, IDC_EDIT_FONTSIZE, m_EditFontSize); ! DDX_Control(pDX, IDC_COMBO_STYLE, m_ComboStyle); ! DDX_Control(pDX, IDC_SAMPLE_TEXT, m_SampleText); ! DDX_Control(pDX, IDC_LIST_FONTSIZE, m_ListFontSize); ! DDX_Control(pDX, IDC_LIST_FONTNAME, m_ListFontName); ! //}}AFX_DATA_MAP } *************** *** 60,67 **** BEGIN_MESSAGE_MAP(CFontPref, CSAPrefsSubDlg) //{{AFX_MSG_MAP(CFontPref) - ON_BN_CLICKED(IDC_BUTTON1, OnButtonChangeFont) ON_WM_HELPINFO() ON_WM_DESTROY() ! //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 68,83 ---- BEGIN_MESSAGE_MAP(CFontPref, CSAPrefsSubDlg) //{{AFX_MSG_MAP(CFontPref) ON_WM_HELPINFO() ON_WM_DESTROY() ! ON_CBN_SELCHANGE(IDC_COMBO_STYLE, OnSelectChangeComboStyle) ! ON_EN_CHANGE(IDC_EDIT_FONTNAME, OnChangeEditFontname) ! ON_EN_CHANGE(IDC_EDIT_FONTSIZE, OnChangeEditFontsize) ! ON_LBN_SELCHANGE(IDC_LIST_FONTNAME, OnSelectChangeListFontname) ! ON_LBN_SELCHANGE(IDC_LIST_FONTSIZE, OnSelectChangeListFontsize) ! ON_BN_CLICKED(IDC_CHECK_BOLD, OnCheckBold) ! ON_BN_CLICKED(IDC_CHECK_ITALIC, OnCheckItalic) ! ON_BN_CLICKED(IDC_CHECK_UNDERLINE, OnCheckUnderline) ! ON_BN_CLICKED(IDC_BUTTON_TOALLSTYLES, OnButtonToAllStyles) ! //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 69,138 **** // CFontPref message handlers ! BOOL CFontPref::OnInitDialog() { CSAPrefsSubDlg::OnInitDialog(); - m_edit.SetWindowText("Here you can define only the default font. But AnyEdit scripting files allow font to be specified for each and every style of highlight. You can specify the size, weight, state and font with ease in the scripting files and is easily configurable for each and every type of syntax file that you have ! NOTE : You have to reopen already open windows to get the change in font!"); - ! LOGFONT *plf; ! UINT unSize; ! m_reg.GetProfileBinary( CODE_SECTION, KEY_FONT, ( LPBYTE * ) &plf, &unSize ); ! ! if(plf!=NULL) ! { ! m_Font.CreateFontIndirect(plf); ! delete plf; ! } ! else ! { ! VERIFY(m_Font.CreateFont( ! 12, // nHeight ! 0, // nWidth ! 0, // nEscapement ! 0, // nOrientation ! FW_NORMAL, // nWeight ! FALSE, // bItalic ! FALSE, // bUnderline ! 0, // cStrikeOut ! ANSI_CHARSET, // nCharSet ! OUT_DEFAULT_PRECIS, // nOutPrecision ! CLIP_DEFAULT_PRECIS, // nClipPrecision ! DEFAULT_QUALITY, // nQuality ! DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily ! "Courier")); // lpszFacename*/ ! } ! m_edit.SetFont (&m_Font); ! return TRUE; // return TRUE unless you set the focus to a control ! // EXCEPTION: OCX Property Pages should return FALSE ! } ! void CFontPref::OnButtonChangeFont() ! { ! LOGFONT plf; ! m_Font.GetLogFont(&plf); ! CFontDialog tempF(&plf); ! tempF.m_cf.Flags = CF_INITTOLOGFONTSTRUCT | CF_ENABLEHOOK | CF_SCREENFONTS | CF_NOVERTFONTS | CF_SELECTSCRIPT; ! if(tempF.DoModal()==IDOK) ! { ! m_Font.DeleteObject(); ! LOGFONT lf; ! memcpy(&lf, tempF.m_cf.lpLogFont, sizeof(LOGFONT)); ! m_reg.WriteProfileBinary( CODE_SECTION, KEY_FONT, ( LPBYTE ) &lf, sizeof( lf ) ); ! m_reg.WriteProfileString(CODE_SECTION,"FontFace",tempF.GetFaceName()); ! m_reg.WriteProfileInt(CODE_SECTION,"FontSize",tempF.GetSize()/10); ! m_Font.CreateFontIndirect(&lf); ! m_edit.SetFont (&m_Font); ! } } - BOOL CFontPref::OnHelpInfo(HELPINFO* pHelpInfo) { --- 85,172 ---- // CFontPref message handlers ! int CALLBACK CFontPref::EnumFontFamExProc( ENUMLOGFONTEX* lpelfe, NEWTEXTMETRICEX* lpntme, int FontType, LPARAM lParam ) ! { ! // First filter out the FF_DECORATIVE fonts ! if( ( lpelfe->elfLogFont.lfPitchAndFamily & 0xF0 ) < 0x50 ) ! { ! // We first try to find the string in the ListBox. We don't want to add the same ! // string for every script we have a font in. ! if( -1 == ((CListBox*)lParam)->FindStringExact( 0, (char*)lpelfe->elfLogFont.lfFaceName ) ) ! { ! ((CListBox*)lParam)->AddString( (char*)lpelfe->elfLogFont.lfFaceName ); ! } ! } ! return 1; ! } BOOL CFontPref::OnInitDialog() { + int iCount; + CString szTemp; CSAPrefsSubDlg::OnInitDialog(); ! // Fill Font Names ! LOGFONT lf; ! CDC* cdc; ! lf.lfCharSet = DEFAULT_CHARSET; ! lf.lfFaceName[0] = '\0'; ! lf.lfPitchAndFamily = 0; ! cdc = GetDC(); ! EnumFontFamiliesEx( cdc->m_hDC, &lf, (FONTENUMPROC)EnumFontFamExProc, (long)&m_ListFontName, 0 ); ! ReleaseDC( cdc ); + // Fill Font Sizes + // It's not the ideal way to insert the sizes, but for now it makes it + // easier. We just put a number of sizes in the list. It would be better + // to update the list with the possible sizes of the font. Since Scintilla + // doesn't mind what size you give it, I just have standard sizes. + m_ListFontSize.InsertString( 0, "6" ); + m_ListFontSize.InsertString( 1, "8" ); + m_ListFontSize.InsertString( 2, "9" ); + m_ListFontSize.InsertString( 3, "10" ); + m_ListFontSize.InsertString( 4, "11" ); + m_ListFontSize.InsertString( 5, "12" ); + m_ListFontSize.InsertString( 6, "14" ); + m_ListFontSize.InsertString( 7, "16" ); + m_ListFontSize.InsertString( 8, "18" ); + m_ListFontSize.InsertString( 9, "20" ); + m_ListFontSize.InsertString( 10, "22" ); + m_ListFontSize.InsertString( 11, "24" ); + m_ListFontSize.InsertString( 12, "26" ); + m_ListFontSize.InsertString( 13, "28" ); + m_ListFontSize.InsertString( 14, "36" ); + m_ListFontSize.InsertString( 15, "48" ); + m_ListFontSize.InsertString( 16, "72" ); ! // Reading the syntax file values ! iNrOfStyles = 0; ! for( iCount = 0; iCount < STYLE_MAX; ++ iCount ) ! { ! CString szStyleName = m_pSyntaxFile->GetStyleName( iCount ); ! if( !szStyleName.IsEmpty() ) ! { ! m_ComboStyle.InsertString( iNrOfStyles, szStyleName ); ! m_ComboStyle.SetItemData( iNrOfStyles, iCount ); ! mapFontName.SetAt( iCount, m_pSyntaxFile->GetStyleFontName( iCount ) ); ! szTemp.Format( "%i", m_pSyntaxFile->GetStyleFontSize( iCount ) ); ! mapFontSize.SetAt( iCount, szTemp ); ! mapBold.SetAt( iCount, m_pSyntaxFile->GetStyleFontBold( iCount ) ); ! mapItalic.SetAt( iCount, m_pSyntaxFile->GetStyleFontItalic( iCount ) ); ! mapUnderline.SetAt( iCount, m_pSyntaxFile->GetStyleFontUnderline( iCount ) ); ! ++ iNrOfStyles; ! } ! } ! // Setting the initial values ! m_ComboStyle.SetCurSel(0); ! OnSelectChangeComboStyle(); + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE } BOOL CFontPref::OnHelpInfo(HELPINFO* pHelpInfo) { *************** *** 155,156 **** --- 189,421 ---- m_Font.DeleteObject(); } + + void CFontPref::SetSyntaxFile( CSyntaxFile* lpSyntaxFile ) + { + m_pSyntaxFile = lpSyntaxFile; + } + + + void CFontPref::OnSelectChangeComboStyle() + { + CString szTemp; + BOOL bCheck; + + // Set Font name and size + mapFontName.Lookup( m_ComboStyle.GetCurSel(), szTemp ); + m_ListFontName.SelectString( 0, szTemp ); + m_EditFontName.SetWindowText( szTemp ); + + mapFontSize.Lookup( m_ComboStyle.GetCurSel(), szTemp ); + m_ListFontSize.SelectString( 0, szTemp ); + m_EditFontSize.SetWindowText( szTemp ); + + // Set the check boxes. + mapBold.Lookup( m_ComboStyle.GetCurSel(), bCheck ); + m_Bold.SetCheck( bCheck ); + mapItalic.Lookup( m_ComboStyle.GetCurSel(), bCheck ); + m_Italic.SetCheck( bCheck ); + mapUnderline.Lookup( m_ComboStyle.GetCurSel(), bCheck ); + m_Underline.SetCheck( bCheck ); + } + + void CFontPref::OnChangeEditFontname() + { + CWnd* wnd; + CString szFontName; + m_EditFontName.GetWindowText( szFontName ); + if( !szFontName.IsEmpty() ) + { + if( LB_ERR == m_ListFontName.SelectString( 0, szFontName ) ) + { + m_ListFontName.SetCurSel( -1 ); + } + else + { + CString szListFontName; + m_ListFontName.GetText( m_ListFontName.GetCurSel(), szListFontName ); + if( szListFontName.GetLength() > szFontName.GetLength() ) + { + // Complete the fontname and select the remaining characters. + m_EditFontName.SetWindowText( szListFontName ); + m_EditFontName.SetSel( szFontName.GetLength(), -1 ); + + // Store the new selected font name + m_EditFontName.GetWindowText( szFontName ); + mapFontName.SetAt( m_ComboStyle.GetCurSel(), szFontName ); + + // Tell the parent something changed, so the apply button can be activated + wnd = GetParentOwner(); + if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); + } + } + } + } + + void CFontPref::OnChangeEditFontsize() + { + CWnd* wnd; + CString szFontSize; + m_EditFontSize.GetWindowText( szFontSize ); + if( !szFontSize.IsEmpty() ) + { + if( LB_ERR == m_ListFontSize.SelectString( 0, szFontSize ) ) + { + m_ListFontSize.SetCurSel( -1 ); + } + else + { + CString szListSize; + m_ListFontSize.GetText( m_ListFontSize.GetCurSel(), szListSize ); + if( szListSize.GetLength() > szFontSize.GetLength() ) + { + // Complete the fontsize and select the remaining chatacters. + m_EditFontSize.SetWindowText( szListSize ); + m_EditFontSize.SetSel( szFontSize.GetLength(), -1 ); + + // Store the new selected size + m_EditFontSize.GetWindowText( szFontSize ); + mapFontSize.SetAt( m_ComboStyle.GetCurSel(), szFontSize ); + + // Tell the parent something changed, so the apply button can be activated + wnd = GetParentOwner(); + if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); + } + } + } + } + + void CFontPref::OnSelectChangeListFontname() + { + CWnd* wnd; + CString szFontName; + m_ListFontName.GetText( m_ListFontName.GetCurSel(), szFontName ); + if( !szFontName.IsEmpty() ) + { + mapFontName.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), szFontName ); + m_EditFontName.SetWindowText( szFontName ); + + // Tell the parent something changed, so the apply button can be activated + wnd = GetParentOwner(); + if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); + } + } + + void CFontPref::OnSelectChangeListFontsize() + { + CWnd* wnd; + CString szFontSize; + m_ListFontSize.GetText( m_ListFontSize.GetCurSel(), szFontSize ); + if( !szFontSize.IsEmpty() ) + { + mapFontSize.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), szFontSize ); + m_EditFontSize.SetWindowText( szFontSize ); + + // Tell the parent something changed, so the apply button can be activated + wnd = GetParentOwner(); + if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); + } + } + + void CFontPref::OnCheckBold() + { + CWnd* wnd; + + // Get the style number from the combobox and change the bold value in the bold map + mapBold.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Bold.GetCheck() ); + + // Tell the parent something changed, so the apply button can be activated + wnd = GetParentOwner(); + if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); + } + + void CFontPref::OnCheckItalic() + { + CWnd* wnd; + + // Get the style number from the combobox and change the italic value in the italic map + mapItalic.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Italic.GetCheck() ); + + // Tell the parent something changed, so the apply button can be activated + wnd = GetParentOwner(); + if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); + } + + void CFontPref::OnCheckUnderline() + { + CWnd* wnd; + + // Get the style number from the combobox and change the underline value in the underline map + mapUnderline.SetAt( m_ComboStyle.GetItemData( m_ComboStyle.GetCurSel() ), m_Underline.GetCheck() ); + + // Tell the parent something changed, so the apply button can be activated + wnd = GetParentOwner(); + if( NULL != wnd ) wnd->PostMessage( WM_PREFERENCE_CHANGED ); + } + + void CFontPref::OnButtonToAllStyles() + { + int iCount; + int iStyleNumber; + BOOL bBold; + BOOL bItalic; + BOOL bUnderline; + CString szFontName; + CString szFontSize; + CString szTemp; + POSITION pos; + + // First get the current set font + m_EditFontName.GetWindowText( szFontName ); + m_EditFontSize.GetWindowText( szFontSize ); + bBold = m_Bold.GetCheck(); + bItalic = m_Italic.GetCheck(); + bUnderline = m_Underline.GetCheck(); + + pos = mapFontName.GetStartPosition(); + for( iCount = 0; iCount < mapFontName.GetCount(); ++ iCount ) + { + // Get the style number + mapFontName.GetNextAssoc( pos, iStyleNumber, szTemp ); + + // Set this style to the current values + mapFontName.SetAt( iStyleNumber, szFontName ); + mapFontSize.SetAt( iStyleNumber, szFontSize ); + mapBold.SetAt( iStyleNumber, bBold ); + mapItalic.SetAt( iStyleNumber, bItalic ); + mapUnderline.SetAt( iStyleNumber, bUnderline ); + } + MessageBox( "All styles have been set to currrent font selection." ); + } + + void CFontPref::SaveChanges() + { + int iCount; + int iStyleNumber; + BOOL bBold; + BOOL bItalic; + BOOL bUnderline; + CString szFontName; + CString szFontSize; + POSITION pos; + + // First get the current set font + pos = mapFontName.GetStartPosition(); + for( iCount = 0; iCount < mapFontName.GetCount(); ++ iCount ) + { + // Get the style number and the font name + mapFontName.GetNextAssoc( pos, iStyleNumber, szFontName ); + + // Get the other font values from the different maps + mapFontSize.Lookup( iStyleNumber, szFontSize ); + mapBold.Lookup( iStyleNumber, bBold ); + mapItalic.Lookup( iStyleNumber, bItalic ); + mapUnderline.Lookup( iStyleNumber, bUnderline ); + + // Change the values in the SyntaxFile object + m_pSyntaxFile->SetStyleFontName( iStyleNumber, szFontName ); + m_pSyntaxFile->SetStyleFontSize( iStyleNumber, atoi( szFontSize ) ); + m_pSyntaxFile->SetStyleFontBold( iStyleNumber, bBold ); + m_pSyntaxFile->SetStyleFontItalic( iStyleNumber, bItalic ); + m_pSyntaxFile->SetStyleFontUnderline( iStyleNumber, bUnderline ); + } + } Index: FontPref.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FontPref.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FontPref.h 8 May 2003 12:00:56 -0000 1.3 --- FontPref.h 12 Feb 2004 13:05:50 -0000 1.4 *************** *** 7,10 **** --- 7,11 ---- // FontPref.h : header file // + #include "SyntaxFile.h" #include "RegProfile.h" ///////////////////////////////////////////////////////////////////////////// *************** *** 20,31 **** // Dialog Data //{{AFX_DATA(CFontPref) ! enum { IDD = IDD_PREF_FONT }; ! CEdit m_edit; ! CButton m_button; ! //}}AFX_DATA //void delete(){}; protected: CRegProfile m_reg; CFont m_Font; protected: --- 21,46 ---- // Dialog Data //{{AFX_DATA(CFontPref) ! enum { IDD = IDD_PREF_FONT }; ! CButton m_Underline; ! CButton m_Italic; ! CButton m_Bold; ! CEdit m_EditFontName; ! CEdit m_EditFontSize; ! CComboBox m_ComboStyle; ! CStatic m_SampleText; ! CListBox m_ListFontSize; ! CListBox m_ListFontName; ! //}}AFX_DATA //void delete(){}; protected: + int iNrOfStyles; CRegProfile m_reg; CFont m_Font; + CSyntaxFile* m_pSyntaxFile; + CMap<int,int,CString,CString> mapFontName; + CMap<int,int,CString,CString> mapFontSize; + CMap<int,int,BOOL,BOOL> mapBold; + CMap<int,int,BOOL,BOOL> mapItalic; + CMap<int,int,BOOL,BOOL> mapUnderline; protected: *************** *** 38,43 **** virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL - // Implementation protected: --- 53,63 ---- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL + static int CALLBACK EnumFontFamExProc( ENUMLOGFONTEX* lpelfe, NEWTEXTMETRICEX* lpntme, int FontType, LPARAM lParam ); + + // Implementation + public: + void SetSyntaxFile( CSyntaxFile* lpSyntaxFile ); + void SaveChanges(); protected: *************** *** 45,52 **** //{{AFX_MSG(CFontPref) virtual BOOL OnInitDialog(); - afx_msg void OnButtonChangeFont(); afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo); afx_msg void OnDestroy(); ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; --- 65,80 ---- //{{AFX_MSG(CFontPref) virtual BOOL OnInitDialog(); afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo); afx_msg void OnDestroy(); ! afx_msg void OnSelectChangeComboStyle(); ! afx_msg void OnChangeEditFontname(); ! afx_msg void OnChangeEditFontsize(); ! afx_msg void OnSelectChangeListFontname(); ! afx_msg void OnSelectChangeListFontsize(); ! afx_msg void OnCheckBold(); ! afx_msg void OnCheckItalic(); ! afx_msg void OnCheckUnderline(); ! afx_msg void OnButtonToAllStyles(); ! //}}AFX_MSG DECLARE_MESSAGE_MAP() }; Index: MainFrm.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/MainFrm.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** MainFrm.cpp 28 Nov 2003 13:20:37 -0000 1.29 --- MainFrm.cpp 12 Feb 2004 13:05:50 -0000 1.30 *************** *** 33,46 **** #include "MainFrm.h" #include "SAPrefsDialog.h" - #include "GeneralPref.h" - #include "EditorPref.h" - #include "FontPref.h" - #include "ColorPref.h" - #include "ToolPref.h" - #include "AssociationPref.h" - #include "CodingPref.h" - #include "LangPref.h" - #include "TemplatePref.h" - #include "DirextPref.h" #include "process.h" --- 33,36 ---- *************** *** 960,965 **** void CMainFrame::OnConfigurePreferences() { ! CSAPrefsDialog dlg; ! CGeneralPref dlgGeneral; EditorPref dlgEditor; CFontPref dlgFont; --- 950,958 ---- void CMainFrame::OnConfigurePreferences() { ! CSAPrefsDialog* dlg; ! ! // TODO: Need to clean this up yet. Will be done in the completion of the ! // preferences update. ! /* CGeneralPref dlgGeneral; EditorPref dlgEditor; CFontPref dlgFont; *************** *** 982,993 **** dlg.AddPage(dlgCoding,"Coding Preferences"); dlg.AddPage(dlgAssoc,"File Associations"); ! dlg.SetTitle("AnyEdit Preferences"); ! dlg.SetConstantText("DeepSoft"); ! if (dlg.DoModal()==IDOK) ! { ! theApp.ResetAllProperties(); ! } } --- 975,987 ---- dlg.AddPage(dlgCoding,"Coding Preferences"); dlg.AddPage(dlgAssoc,"File Associations"); + */ + dlg = new CSAPrefsDialog(); + if( NULL == dlg ) return; ! dlg->SetTitle("Preferences"); ! // dlg->SetConstantText("DeepSoft"); ! dlg->DoModal(); ! delete dlg; } Index: SAPrefsDialog.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsDialog.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SAPrefsDialog.cpp 8 May 2003 12:00:56 -0000 1.3 --- SAPrefsDialog.cpp 12 Feb 2004 13:05:50 -0000 1.4 *************** *** 35,38 **** --- 35,39 ---- #include "SAPrefsDialog.h" #include "AnyEdit.h" + #include "ConfigFile.h" #ifdef _DEBUG *************** *** 54,68 **** m_iCurPage = -1; m_pages.RemoveAll(); ! m_okbutton.m_nFlatStyle = CBCGButton::BUTTONSTYLE_SEMIFLAT; ! m_okbutton.SetImage (IDB_OKTICK,IDB_OKTICK); ! m_applybutton.m_nFlatStyle = CBCGButton::BUTTONSTYLE_SEMIFLAT; ! m_cancelbutton.m_nFlatStyle = CBCGButton::BUTTONSTYLE_SEMIFLAT; ! m_helpbutton.m_nFlatStyle = CBCGButton::BUTTONSTYLE_SEMIFLAT; m_pStartPage = NULL; ! m_cancelbutton.SetImage(IDB_CANCEL,IDB_CANCEL); ! m_helpbutton.SetImage(IDB_HELP_BITMAP,IDB_HELP_BITMAP); ! m_csTitle = "Untitled"; } --- 55,74 ---- m_iCurPage = -1; m_pages.RemoveAll(); ! // m_okbutton.m_nFlatStyle = CBCGButton::BUTTONSTYLE_SEMIFLAT; ! // m_okbutton.SetImage (IDB_OKTICK,IDB_OKTICK); ! // m_applybutton.m_nFlatStyle = CBCGButton::BUTTONSTYLE_SEMIFLAT; ! // m_cancelbutton.m_nFlatStyle = CBCGButton::BUTTONSTYLE_SEMIFLAT; ! // m_helpbutton.m_nFlatStyle = CBCGButton::BUTTONSTYLE_SEMIFLAT; m_pStartPage = NULL; ! // m_cancelbutton.SetImage(IDB_CANCEL,IDB_CANCEL); ! // m_helpbutton.SetImage(IDB_HELP_BITMAP,IDB_HELP_BITMAP); ! m_csTitle = "Untitled"; + + // Set pointer to NULL + m_pEditorPref = NULL; + m_pColorPref = NULL; + m_pFontPref = NULL; } *************** *** 71,74 **** --- 77,85 ---- CSAPrefsDialog::~CSAPrefsDialog() { + // Remove allocated dialog objects + if( NULL != m_pEditorPref ) delete [] m_pEditorPref; + if( NULL != m_pColorPref ) delete [] m_pColorPref; + if( NULL != m_pFontPref ) delete [] m_pFontPref; + // clean up for (int i=0;i<m_pages.GetSize();i++) *************** *** 87,91 **** //{{AFX_DATA_MAP(CSAPrefsDialog) DDX_Control(pDX, IDC_PHELP, m_helpbutton); ! //DDX_Control(pDX, IDC_APPLY, m_applybutton); DDX_Control(pDX, IDCANCEL, m_cancelbutton); DDX_Control(pDX, IDOK, m_okbutton); --- 98,102 ---- //{{AFX_DATA_MAP(CSAPrefsDialog) DDX_Control(pDX, IDC_PHELP, m_helpbutton); ! DDX_Control(pDX, IDC_APPLY, m_applybutton); DDX_Control(pDX, IDCANCEL, m_cancelbutton); DDX_Control(pDX, IDOK, m_okbutton); *************** *** 107,110 **** --- 118,122 ---- //}}AFX_MSG_MAP ON_MESSAGE(WM_CHANGE_PAGE, OnChangePage) + ON_MESSAGE(WM_PREFERENCE_CHANGED, OnPreferencesChanged) END_MESSAGE_MAP() *************** *** 156,159 **** --- 168,226 ---- return -1; + // Let's build the sub dialogs list to select from the tree + int iCount; + CRegProfile registry; + CString szLanguageName; + CString szLanguageNr; + CConfigFile* pConfigFile; + CSyntaxFile* pSyntaxFile; + + // CGeneralPref dlgGeneral; + // EditorPref dlgEditor; + // CFontPref dlgFont; + // CColorPref dlgColor; + // CToolPref dlgTool; + // CAssociationPref dlgAssoc; + // CCodingPref dlgCoding; + // CLangPref dlgLang; + // CTemplatePref dlgTemplate; + // CDirextPref dlgExtDir; + + + // TODO: this part needs a lot of updating. It will come along when + // i'm finishing the other preference pages. + + AddPage( dlgGeneral, "General" ); + AddPage( dlgLang, "Languages" ); + pConfigFile = theApp.GetConfigFile(); + if( NULL == pConfigFile ) return -1; + + iNrOfLanguages = pConfigFile->GetLanguageCount(); + + m_pEditorPref = new EditorPref[iNrOfLanguages]; + if( NULL == m_pEditorPref ) return FALSE; + m_pColorPref = new CColorPref[iNrOfLanguages]; + if( NULL == m_pColorPref ) return FALSE; + m_pFontPref = new CFontPref[iNrOfLanguages]; + if( NULL == m_pFontPref ) return FALSE; + + + // Build our language tree with multiple color and font selection pages. + for( iCount = 1; iCount < iNrOfLanguages; ++ iCount ) + { + pSyntaxFile = theApp.GetSyntaxFile( iCount ); + AddPage( m_pEditorPref[iCount], pConfigFile->GetLanguageName( iCount ), &dlgLang ); + AddPage( m_pColorPref[iCount], "Color", &m_pEditorPref[iCount] ); + m_pColorPref[iCount].SetSyntaxFile( pSyntaxFile ); + AddPage( m_pFontPref[iCount], "Font", &m_pEditorPref[iCount] ); + m_pFontPref[iCount].SetSyntaxFile( pSyntaxFile ); + } + + AddPage(dlgTool,"Tools"); + AddPage(dlgTemplate,"Language Tools"); + AddPage(dlgExtDir,"Folders & Extensions"); + AddPage(dlgCoding,"Coding Preferences"); + AddPage(dlgAssoc,"File Associations"); + return 0; } *************** *** 187,192 **** m_captionBar.m_csFontName = "Verdana"; m_captionBar.SetConstantText(m_csConstantText); ! ! // fill the tree. we'll create the pages as we need them for (int i=0;i<m_pages.GetSize();i++) { --- 254,259 ---- m_captionBar.m_csFontName = "Verdana"; m_captionBar.SetConstantText(m_csConstantText); ! ! // fill the tree. we'll create the pages as we need them for (int i=0;i<m_pages.GetSize();i++) { *************** *** 208,212 **** HTREEITEM hTree = m_pageTree.InsertItem(&tvi); ! m_pageTree.Expand(tvi.hParent,TVE_EXPAND); // keep track of the dlg's we've added (for parent selection) --- 275,279 ---- HTREEITEM hTree = m_pageTree.InsertItem(&tvi); ! // m_pageTree.Expand(tvi.hParent,TVE_EXPAND); // keep track of the dlg's we've added (for parent selection) *************** *** 247,250 **** --- 314,320 ---- } + // The apply button should initialy be off + m_applybutton.EnableWindow( FALSE ); + return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE *************** *** 291,304 **** } ///////////////////////////////////////////////////////////////////////////// ! BOOL CSAPrefsDialog::AddPage(CSAPrefsSubDlg &dlg, const char *pCaption, CSAPrefsSubDlg* pDlgParent /*=NULL*/) { ! if (m_hWnd) { // can't add once the window has been created ASSERT(0); return false; ! } pageStruct *pPS = new pageStruct; --- 361,380 ---- } + LONG CSAPrefsDialog::OnPreferencesChanged(UINT u, LONG l) + { + m_applybutton.EnableWindow( TRUE ); + return 0L; + } + ///////////////////////////////////////////////////////////////////////////// ! BOOL CSAPrefsDialog::AddPage(CSAPrefsSubDlg &dlg, const char *pCaption, CSAPrefsSubDlg* pDlgParent /*=NULL*/ ) { ! /* if (m_hWnd) { // can't add once the window has been created ASSERT(0); return false; ! }*/ pageStruct *pPS = new pageStruct; *************** *** 322,326 **** cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS, NULL, NULL, NULL); cs.style |= WS_CLIPCHILDREN; ! return TRUE; } --- 398,403 ---- cs.lpszClass = AfxRegisterWndClass(CS_DBLCLKS, NULL, NULL, NULL); cs.style |= WS_CLIPCHILDREN; ! ! return TRUE; } *************** *** 436,442 **** ///////////////////////////////////////////////////////////////////////////// ! BOOL CSAPrefsDialog::EndOK(BOOL app) { ! BOOL bOK = true; CSAPrefsSubDlg * pPage = NULL; --- 513,521 ---- ///////////////////////////////////////////////////////////////////////////// ! BOOL CSAPrefsDialog::EndOK(BOOL finish) { ! int iCount; ! BOOL bOK = true; ! CSyntaxFile* pSyntaxFile; CSAPrefsSubDlg * pPage = NULL; *************** *** 454,458 **** if (::IsWindow(pPS->pDlg->m_hWnd)) { ! if (!pPS->pDlg->UpdateData(TRUE)) { bOK = false; --- 533,537 ---- if (::IsWindow(pPS->pDlg->m_hWnd)) { ! if (!pPS->pDlg->UpdateData(TRUE) ) { bOK = false; *************** *** 472,493 **** } ! // tell all of the sub-dialogs "OK" ! for (i=0;i<m_pages.GetSize();i++) ! { ! pageStruct *pPS = (pageStruct *)m_pages.GetAt(i); ! ASSERT(pPS); ! if (pPS) ! { ! ASSERT(pPS->pDlg); ! if (pPS->pDlg) ! { ! if (::IsWindow(pPS->pDlg->m_hWnd)) ! { ! if(app) ! pPS->pDlg->OnOK(); ! } ! } ! } ! } return true; --- 551,596 ---- } ! // Only save the files if something did change in the dialog. ! if( m_applybutton.IsWindowEnabled() ) ! { ! // Save all the data before closing the dialogs ! for( iCount = 1; iCount < iNrOfLanguages; ++ iCount ) ! { ! m_pColorPref[iCount].SaveChanges(); ! m_pFontPref[iCount].SaveChanges(); ! ! // Here we actually save the data to disk. The pages save ! // it in memory. ! pSyntaxFile = theApp.GetSyntaxFile( iCount ); ! pSyntaxFile->Save(); ! } ! } ! ! // Only end dialogs if user pressed OK ! if( finish ) ! { ! // tell all of the sub-dialogs "OK" ! for (i=0;i<m_pages.GetSize();i++) ! { ! pageStruct *pPS = (pageStruct *)m_pages.GetAt(i); ! ASSERT(pPS); ! if (pPS) ! { ! ASSERT(pPS->pDlg); ! if (pPS->pDlg) ! { ! if (::IsWindow(pPS->pDlg->m_hWnd)) ! { ! pPS->pDlg->OnOK(); ! } ! } ! } ! } ! } ! ! // If all is ok, we can update all the properties ! // and refresh the view. But only if the apply button ! // is enabled, if not the preferences didn't change. ! if( m_applybutton.IsWindowEnabled() ) theApp.ResetAllProperties(); return true; *************** *** 589,593 **** void CSAPrefsDialog::OnPhelp() { ! CString str = theApp.GetAppPath(); switch(m_iCurPage) --- 692,696 ---- void CSAPrefsDialog::OnPhelp() { ! CString str( theApp.GetAppPath() ); switch(m_iCurPage) *************** *** 633,636 **** --- 736,740 ---- { EndOK(FALSE); + m_applybutton.EnableWindow( FALSE ); } Index: SAPrefsDialog.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsDialog.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SAPrefsDialog.h 8 May 2003 12:00:56 -0000 1.3 --- SAPrefsDialog.h 12 Feb 2004 13:05:50 -0000 1.4 *************** *** 38,41 **** --- 38,52 ---- #include "SAPrefsSubDlg.h" + #include "GeneralPref.h" + #include "EditorPref.h" + #include "FontPref.h" + #include "ColorPref.h" + #include "ToolPref.h" + #include "AssociationPref.h" + #include "CodingPref.h" + #include "LangPref.h" + #include "TemplatePref.h" + #include "DirextPref.h" + #include <afxtempl.h> *************** *** 47,50 **** --- 58,62 ---- CSAPrefsSubDlg *pDlgParent; CString csCaption; + int iLanguageNr; }; *************** *** 64,71 **** //{{AFX_DATA(CSAPrefsDialog) enum { IDD = IDD_SAPREFS }; ! CBCGButton m_helpbutton; ! CBCGButton m_applybutton; ! CBCGButton m_cancelbutton; ! CBCGButton m_okbutton; CStatic m_boundingFrame; //}}AFX_DATA --- 76,83 ---- //{{AFX_DATA(CSAPrefsDialog) enum { IDD = IDD_SAPREFS }; ! CButton m_helpbutton; ! CButton m_applybutton; ! CButton m_cancelbutton; ! CButton m_okbutton; CStatic m_boundingFrame; //}}AFX_DATA *************** *** 114,118 **** protected: ! BOOL EndOK(BOOL app=TRUE); // if you don't like this, you can replace it with a static --- 126,130 ---- protected: ! BOOL EndOK(BOOL finish=TRUE); // if you don't like this, you can replace it with a static *************** *** 137,140 **** --- 149,153 ---- //}}AFX_MSG afx_msg long OnChangePage(UINT, LONG); + afx_msg long OnPreferencesChanged(UINT, LONG); DECLARE_MESSAGE_MAP() *************** *** 151,154 **** --- 164,178 ---- CMap< CSAPrefsSubDlg *, CSAPrefsSubDlg *, DWORD, DWORD& > m_dlgMap; + int iNrOfLanguages; + CGeneralPref dlgGeneral; + CLangPref dlgLang; + EditorPref* m_pEditorPref; + CColorPref* m_pColorPref; + CFontPref* m_pFontPref; + CToolPref dlgTool; + CAssociationPref dlgAssoc; + CCodingPref dlgCoding; + CTemplatePref dlgTemplate; + CDirextPref dlgExtDir; }; Index: SAPrefsSubDlg.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsSubDlg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SAPrefsSubDlg.h 8 May 2003 12:00:56 -0000 1.2 --- SAPrefsSubDlg.h 12 Feb 2004 13:05:50 -0000 1.3 *************** *** 36,39 **** --- 36,42 ---- #endif // _MSC_VER >= 1000 + #define WM_PREFERENCE_CHANGED (WM_USER + 2000) // User changed a setting in a sub dialog + // The main dialog should enable the apply button + class CSAPrefsSubDlg : public CDialog { Index: SyntaxFile.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SyntaxFile.cpp 12 Dec 2003 11:00:04 -0000 1.1 --- SyntaxFile.cpp 12 Feb 2004 13:05:50 -0000 1.2 *************** *** 72,75 **** --- 72,80 ---- } + CString CSyntaxFile::GetFilename() + { + return szFileName; + } + void CSyntaxFile::SetFilename( CString lszFileName ) { *************** *** 558,562 **** } ! BOOL CSyntaxFile::SetStyleFontName( int iStyle, TCHAR* FontName ) { xml_node xnode; --- 563,567 ---- } ! BOOL CSyntaxFile::SetStyleFontName( int iStyle, const char* FontName ) { xml_node xnode; *************** *** 569,573 **** if( !xnode.children() ) return FALSE; ! return xnode.child(0).value( FontName ); } --- 574,578 ---- if( !xnode.children() ) return FALSE; ! return xnode.child(0).value( (TCHAR*)FontName ); } *************** *** 827,831 **** ColorIntValueToRGBHex( iColor, szColor ); szColor[8] = '\0'; ! return xnode.child(0).value( &szColor[2] ); } --- 832,836 ---- ColorIntValueToRGBHex( iColor, szColor ); szColor[8] = '\0'; ! return xnode.child(0).value( szColor ); } *************** *** 860,864 **** ColorIntValueToRGBHex( iColor, szColor ); szColor[8] = '\0'; ! return xnode.child(0).value( &szColor[2] ); } --- 865,869 ---- ColorIntValueToRGBHex( iColor, szColor ); szColor[8] = '\0'; ! return xnode.child(0).value( szColor ); } Index: SyntaxFile.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SyntaxFile.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SyntaxFile.h 12 Dec 2003 11:00:04 -0000 1.1 --- SyntaxFile.h 12 Feb 2004 13:05:50 -0000 1.2 *************** *** 99,102 **** --- 99,105 ---- virtual ~CSyntaxFile(); + // Get the currently set filename + CString GetFilename(); + // Set the filename of the syntax file to parse or save. void SetFilename( CString szFileName ); *************** *** 185,189 **** // Sets the FontName of iStyle. ! BOOL SetStyleFontName( int iStyle, TCHAR* FontName ); // Gets the FontSize of iStyle font. --- 188,192 ---- // Sets the FontName of iStyle. ! BOOL SetStyleFontName( int iStyle, const char* FontName ); // Gets the FontSize of iStyle font. Index: resource.h =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/resource.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** resource.h 7 Dec 2003 17:06:11 -0000 1.18 --- resource.h 12 Feb 2004 13:05:50 -0000 1.19 *************** *** 187,190 **** --- 187,200 ---- #define IDC_QJ_LIST 1086 #define IDC_STAT_QJ 1087 + #define IDC_LIST_FONTNAME 1088 + #define IDC_LIST_FONTSIZE 1089 + #define IDC_EDIT_FONTNAME 1090 + #define IDC_CHECK_BOLD 1091 + #define IDC_CHECK_ITALIC 1092 + #define IDC_CHECK_UNDERLINE 1093 + #define IDC_EDIT_FONTSIZE 1094 + #define IDC_BUTTON_TOALLSTYLES 1095 + #define IDC_STATIC_STYLE 1096 + #define IDC_COMBO_STYLE 1097 #define stc32 0x045f #define IDC_OUTLOOK_BAR_PLACEHOLDER 1432 *************** *** 472,476 **** #define _APS_NEXT_RESOURCE_VALUE 252 #define _APS_NEXT_COMMAND_VALUE 33075 ! #define _APS_NEXT_CONTROL_VALUE 1088 #define _APS_NEXT_SYMED_VALUE 105 #endif --- 482,486 ---- #define _APS_NEXT_RESOURCE_VALUE 252 #define _APS_NEXT_COMMAND_VALUE 33075 ! #define _APS_NEXT_CONTROL_VALUE 1098 #define _APS_NEXT_SYMED_VALUE 105 #endif |
From: <moo...@us...> - 2003-12-12 14:54:17
|
Update of /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax In directory sc8-pr-cvs1:/tmp/cvs-serv907/Config/Default/Syntax Added Files: javascript.syn masm.syn perl.syn python.syn Log Message: Added 4 extra XML syntax files and updated AnyEdit.cfg to support them. (javascript.syn, masm.syn, perl.syn, python.syn) --- NEW FILE: javascript.syn --- <Syntax> <Lexer> <Name>SCLEX_CPP</Name> <Property name="fold.comment">1</Property> <Property name="fold.preprocessor">1</Property> </Lexer> <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="0"> <Name>Whitespace</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="34"> <Name>Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="35"> <Name>Bad Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="1"> <Name>Comment Block</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="2"> <Name>Single Line Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="3"> <Name>Comment Doc</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F703F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="4"> <Name>Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="5"> <Name>Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="6"> <Name>Strings</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="7"> <Name>Characters</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>009300</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="8"> <Name>UUIDs</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>804080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="9"> <Name>Preprocessor Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F7F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="10"> <Name>Operators</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>4B0082</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="11"> <Name>Normal Text</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="12"> <Name>String EOL</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>E0C0E0</Background> </Color> </Style> <Style number="13"> <Name>Verbatim</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>E0FFE0</Background> </Color> </Style> <Style number="14"> <Name>Regular Expression</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F7F3F</Foreground> <Background>E0F0FF</Background> </Color> </Style> <Style number="15"> <Name>Comment Line Doc</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F703F</Foreground> <Background>E0F0FF</Background> </Color> </Style> <Style number="16"> <Name>Keywords 2</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>B00040</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="17"> <Name>Comment Doc Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3060A0</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="18"> <Name>Comment Doc Keywords Error</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>804020</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="19"> <Name>Global Class</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Keywords set="0"> <Word>abstract</Word> <Word>boolean</Word> <Word>break</Word> <Word>byte</Word> <Word>case</Word> <Word>catch</Word> <Word>char</Word> <Word>class</Word> <Word>const</Word> <Word>continue</Word> <Word>default</Word> <Word>delete</Word> <Word>do</Word> <Word>double</Word> <Word>else</Word> <Word>extends</Word> <Word>false</Word> <Word>final</Word> <Word>finally</Word> <Word>float</Word> <Word>for</Word> <Word>function</Word> <Word>goto</Word> <Word>if</Word> <Word>implements</Word> <Word>import</Word> <Word>in</Word> <Word>instanceof</Word> <Word>int</Word> <Word>interface</Word> <Word>long</Word> <Word>native</Word> <Word>new</Word> <Word>null</Word> <Word>package</Word> <Word>private</Word> <Word>protected</Word> <Word>public</Word> <Word>return</Word> <Word>short</Word> <Word>static</Word> <Word>super</Word> <Word>switch</Word> <Word>synchronized</Word> <Word>this</Word> <Word>throw</Word> <Word>throws</Word> <Word>transient</Word> <Word>true</Word> <Word>try</Word> <Word>typeof</Word> <Word>var</Word> <Word>void</Word> <Word>while</Word> <Word>with</Word> </Keywords> <Keywords set="1"> <Word>Anchor</Word> <Word>anchors</Word> <Word>Applet</Word> <Word>applets</Word> <Word>Area</Word> <Word>Array</Word> <Word>Button</Word> <Word>Checkbox</Word> <Word>Date</Word> <Word>document</Word> <Word>FileUpload</Word> <Word>Form</Word> <Word>forms</Word> <Word>Frame</Word> <Word>frames</Word> <Word>Hidden</Word> <Word>history</Word> <Word>Image</Word> <Word>images</Word> <Word>Link</Word> <Word>links</Word> <Word>Area</Word> <Word>location</Word> <Word>Math</Word> <Word>MimeType</Word> <Word>mimeTypes</Word> <Word>navigator</Word> <Word>options</Word> <Word>Password</Word> <Word>Plugin</Word> <Word>plugins</Word> <Word>Radio</Word> <Word>Reset</Word> <Word>Select</Word> <Word>String</Word> <Word>Submit</Word> <Word>Text</Word> <Word>Textarea</Word> <Word>window</Word> </Keywords> </Syntax> --- NEW FILE: masm.syn --- <Syntax> <Lexer> <Name>SCLEX_ASM</Name> </Lexer> <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="0"> <Name>Whitespace</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>8</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>808080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="1"> <Name>Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>ADADAD</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="2"> <Name>Number</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="3"> <Name>Strings</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="4"> <Name>Operators</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>4B0082</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="5"> <Name>Identifiers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="6"> <Name>CPU Instruction</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="7"> <Name>FPU Instruction</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="8"> <Name>Register</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>46AA03</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="9"> <Name>Directive</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="10"> <Name>Directive Operand</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="11"> <Name>Comment Block</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="12"> <Name>Character</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>009300</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="13"> <Name>String EOL</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>E0C0E0</Background> </Color> </Style> <Style number="14"> <Name>Ext Instruction</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Keywords set="0"> <Word>aaa</Word> <Word>aad</Word> <Word>aam</Word> <Word>aas</Word> <Word>adc</Word> <Word>add</Word> <Word>and</Word> <Word>arpl</Word> <Word>bound</Word> <Word>bsf</Word> <Word>bsr</Word> <Word>bswap</Word> <Word>bt</Word> <Word>btc</Word> <Word>btr</Word> <Word>bts</Word> <Word>call</Word> <Word>cbw</Word> <Word>cdq</Word> <Word>clc</Word> <Word>cld</Word> <Word>cli</Word> <Word>clts</Word> <Word>cmc</Word> <Word>cmp</Word> <Word>cmps</Word> <Word>cmpx</Word> <Word>chg</Word> <Word>cwd</Word> <Word>cwde</Word> <Word>daa</Word> <Word>das</Word> <Word>dec</Word> <Word>div</Word> <Word>enter</Word> <Word>esc</Word> <Word>hlt</Word> <Word>idiv</Word> <Word>imul</Word> <Word>in</Word> <Word>inc</Word> <Word>include</Word> <Word>includelib</Word> <Word>ins</Word> <Word>int</Word> <Word>into</Word> <Word>invd</Word> <Word>invlpg</Word> <Word>invoke</Word> <Word>iret</Word> <Word>iretd</Word> <Word>ja</Word> <Word>jae</Word> <Word>jb</Word> <Word>jbe</Word> <Word>jc</Word> <Word>jcxz</Word> <Word>je</Word> <Word>jecx</Word> <Word>jecxz</Word> <Word>jg</Word> <Word>jge</Word> <Word>jl</Word> <Word>jle</Word> <Word>jmp</Word> <Word>jna</Word> <Word>jnae</Word> <Word>jnb</Word> <Word>jnbe</Word> <Word>jnc</Word> <Word>jne</Word> <Word>jng</Word> <Word>jnge</Word> <Word>jnl</Word> <Word>jnle</Word> <Word>jno</Word> <Word>jnp</Word> <Word>jns</Word> <Word>jnz</Word> <Word>jo</Word> <Word>jp</Word> <Word>jpe</Word> <Word>jpo</Word> <Word>js</Word> <Word>lahf</Word> <Word>lar</Word> <Word>lds</Word> <Word>lea</Word> <Word>leave</Word> <Word>les</Word> <Word>lfs</Word> <Word>lgdt</Word> <Word>lidt</Word> <Word>lgs</Word> <Word>lldt</Word> <Word>lmsw</Word> <Word>lock</Word> <Word>lods</Word> <Word>loop</Word> <Word>loope</Word> <Word>loopz</Word> <Word>loopnz</Word> <Word>loopne</Word> <Word>lsl</Word> <Word>lss</Word> <Word>ltr</Word> <Word>mov</Word> <Word>movs</Word> <Word>movsb</Word> <Word>movsd</Word> <Word>movsw</Word> <Word>movsx</Word> <Word>movzx</Word> <Word>mul</Word> <Word>neg</Word> <Word>nop</Word> <Word>not</Word> <Word>or</Word> <Word>out</Word> <Word>outs</Word> <Word>pop</Word> <Word>popa</Word> <Word>popad</Word> <Word>popf</Word> <Word>popfd</Word> <Word>push</Word> <Word>pusha</Word> <Word>pushad</Word> <Word>pushf</Word> <Word>pushfd</Word> <Word>rcl</Word> <Word>rcr</Word> <Word>rep</Word> <Word>repe</Word> <Word>repz</Word> <Word>repne</Word> <Word>repnz</Word> <Word>ret</Word> <Word>retf</Word> <Word>rol</Word> <Word>ror</Word> <Word>sahf</Word> <Word>sal</Word> <Word>sar</Word> <Word>sbb</Word> <Word>scas</Word> <Word>setae</Word> <Word>setnb</Word> <Word>setb</Word> <Word>setnae</Word> <Word>setbe</Word> <Word>setna</Word> <Word>sete</Word> <Word>setz</Word> <Word>setne</Word> <Word>setnz</Word> <Word>setl</Word> <Word>setnge</Word> <Word>setge</Word> <Word>setnl</Word> <Word>setle</Word> <Word>setng</Word> <Word>setg</Word> <Word>setnle</Word> <Word>sets</Word> <Word>setns</Word> <Word>setc</Word> <Word>setnc</Word> <Word>seto</Word> <Word>setno</Word> <Word>setp</Word> <Word>setpe</Word> <Word>setnp</Word> <Word>setpo</Word> <Word>sgdt</Word> <Word>sidt</Word> <Word>shl</Word> <Word>shr</Word> <Word>shld</Word> <Word>shrd</Word> <Word>sldt</Word> <Word>smsw</Word> <Word>stc</Word> <Word>std</Word> <Word>sti</Word> <Word>stos</Word> <Word>str</Word> <Word>sub</Word> <Word>test</Word> <Word>verr</Word> <Word>verw</Word> <Word>wait</Word> <Word>fwait</Word> <Word>wbinvd</Word> <Word>xchg</Word> <Word>xlat</Word> <Word>xlatb</Word> <Word>xor</Word> </Keywords> <Keywords set="1"> <Word>f2xm1</Word> <Word>fabs</Word> <Word>fadd</Word> <Word>faddp</Word> <Word>fbld</Word> <Word>fbstp</Word> <Word>fchs</Word> <Word>fclex</Word> <Word>fcom</Word> <Word>fcomp</Word> <Word>fcompp</Word> <Word>fdecstp</Word> <Word>fdisi</Word> <Word>fdiv</Word> <Word>fdivp</Word> <Word>fdivr</Word> <Word>fdivrp</Word> <Word>feni</Word> <Word>ffree</Word> <Word>fiadd</Word> <Word>ficom</Word> <Word>ficomp</Word> <Word>fidiv</Word> <Word>fidivr</Word> <Word>fild</Word> <Word>fimul</Word> <Word>fincstp</Word> <Word>finit</Word> <Word>fist</Word> <Word>fistp</Word> <Word>fisub</Word> <Word>fisubr</Word> <Word>fld</Word> <Word>fld1</Word> <Word>fldcw</Word> <Word>fldenv</Word> <Word>fldenvw</Word> <Word>fldl2e</Word> <Word>fldl2t</Word> <Word>fldlg2</Word> <Word>fldln2</Word> <Word>fldpi</Word> <Word>fldz</Word> <Word>fmul</Word> <Word>fmulp</Word> <Word>fnclex</Word> <Word>fndisi</Word> <Word>fneni</Word> <Word>fninit</Word> <Word>fnop</Word> <Word>fnsave</Word> <Word>fnsavew</Word> <Word>fnstcw</Word> <Word>fnstenv</Word> <Word>fnstenvw</Word> <Word>fnstsw</Word> <Word>fpatan</Word> <Word>fprem</Word> <Word>fptan</Word> <Word>frndint</Word> <Word>frstor</Word> <Word>frstorw</Word> <Word>fsave</Word> <Word>fsavew</Word> <Word>fscale</Word> <Word>fsqrt</Word> <Word>fst</Word> <Word>fstcw</Word> <Word>fstenv</Word> <Word>fstenvw</Word> <Word>fstp</Word> <Word>fstsw</Word> <Word>fsub</Word> <Word>fsubp</Word> <Word>fsubr</Word> <Word>fsubrp</Word> <Word>ftst</Word> <Word>fwait</Word> <Word>fxam</Word> <Word>fxch</Word> <Word>fxtract</Word> <Word>fyl2x</Word> <Word>fyl2xp1</Word> <Word>fsetpm</Word> <Word>fcos</Word> <Word>fldenvd</Word> <Word>fnsaved</Word> <Word>fnstenvd</Word> <Word>fprem1</Word> <Word>frstord</Word> <Word>fsaved</Word> <Word>fsin</Word> <Word>fsincos</Word> <Word>fstenvd</Word> <Word>fucom</Word> <Word>fucomp</Word> <Word>fucompp</Word> </Keywords> <Keywords set="2"> <Word>ah</Word> <Word>al</Word> <Word>ax</Word> <Word>bh</Word> <Word>bl</Word> <Word>bp</Word> <Word>bx</Word> <Word>ch</Word> <Word>cl</Word> <Word>cr0</Word> <Word>cr2</Word> <Word>cr3</Word> <Word>cs</Word> <Word>cx</Word> <Word>dh</Word> <Word>di</Word> <Word>dl</Word> <Word>dr0</Word> <Word>dr1</Word> <Word>dr2</Word> <Word>dr3</Word> <Word>dr6</Word> <Word>dr7</Word> <Word>ds</Word> <Word>dx</Word> <Word>eax</Word> <Word>ebp</Word> <Word>ebx</Word> <Word>ecx</Word> <Word>edi</Word> <Word>edx</Word> <Word>es</Word> <Word>esi</Word> <Word>esp</Word> <Word>fs</Word> <Word>gs</Word> <Word>si</Word> <Word>sp</Word> <Word>ss</Word> <Word>st</Word> <Word>tr3</Word> <Word>tr4</Word> <Word>tr5</Word> <Word>tr6</Word> <Word>tr7</Word> </Keywords> <Keywords set="3"> <Word>.186</Word> <Word>.286</Word> <Word>.286c</Word> <Word>.286p</Word> <Word>.287</Word> <Word>.386</Word> <Word>.386c</Word> <Word>.386p</Word> <Word>.387</Word> <Word>.486</Word> <Word>.486p</Word> <Word>.8086</Word> <Word>.8087</Word> <Word>.alpha</Word> <Word>.break</Word> <Word>.code</Word> <Word>.const</Word> <Word>.continue</Word> <Word>.cref</Word> <Word>.data</Word> <Word>.data?</Word> <Word>.dosseg</Word> <Word>.else</Word> <Word>.elseif</Word> <Word>.endif</Word> <Word>.endw</Word> <Word>.err</Word> <Word>.err1</Word> <Word>.err2</Word> <Word>.errb</Word> <Word>.errdef</Word> <Word>.errdif</Word> <Word>.errdifi</Word> <Word>.erre</Word> <Word>.erridn</Word> <Word>.erridni</Word> <Word>.errnb</Word> <Word>.errndef</Word> <Word>.errnz</Word> <Word>.exit</Word> <Word>.fardata</Word> <Word>.fardata?</Word> <Word>.if</Word> <Word>.lall</Word> <Word>.lfcond</Word> <Word>.list</Word> <Word>.listall</Word> <Word>.listif</Word> <Word>.listmacro</Word> <Word>.listmacroall</Word> <Word>.model</Word> <Word>.no87</Word> <Word>.nocref</Word> <Word>.nolist</Word> <Word>.nolistif</Word> <Word>.nolistmacro</Word> <Word>.radix</Word> <Word>.repeat</Word> <Word>.sall</Word> <Word>.seq</Word> <Word>.sfcond</Word> <Word>.stack</Word> <Word>.startup</Word> <Word>.tfcond</Word> <Word>.type</Word> <Word>.until</Word> <Word>.untilcxz</Word> <Word>.while</Word> <Word>.xall</Word> <Word>.xcref</Word> <Word>.xlist</Word> <Word>alias</Word> <Word>align</Word> <Word>assume</Word> <Word>catstr</Word> <Word>comm</Word> <Word>comment</Word> <Word>db</Word> <Word>dd</Word> <Word>df</Word> <Word>dosseg</Word> <Word>dq</Word> <Word>dt</Word> <Word>dup</Word> <Word>dw</Word> <Word>echo</Word> <Word>else</Word> <Word>elseif</Word> <Word>elseif1</Word> <Word>elseif2</Word> <Word>elseifb</Word> <Word>elseifdef</Word> <Word>elseifdif</Word> <Word>elseifdifi</Word> <Word>elseife</Word> <Word>elseifidn</Word> <Word>elseifidni</Word> <Word>elseifnb</Word> <Word>elseifndef</Word> <Word>end</Word> <Word>endif</Word> <Word>endm</Word> <Word>endp</Word> <Word>ends</Word> <Word>eq</Word> <Word>equ</Word> <Word>even</Word> <Word>exitm</Word> <Word>extern</Word> <Word>externdef</Word> <Word>extrn</Word> <Word>for</Word> <Word>forc</Word> <Word>ge</Word> <Word>goto</Word> <Word>group</Word> <Word>gt</Word> <Word>high</Word> <Word>highword</Word> <Word>if</Word> <Word>if1</Word> <Word>if2</Word> <Word>ifb</Word> <Word>ifdef</Word> <Word>ifdif</Word> <Word>ifdifi</Word> <Word>ife</Word> <Word>ifidn</Word> <Word>ifidni</Word> <Word>ifnb</Word> <Word>ifndef</Word> <Word>include</Word> <Word>includelib</Word> <Word>instr</Word> <Word>invoke</Word> <Word>irp</Word> <Word>irpc</Word> <Word>label</Word> <Word>le</Word> <Word>length</Word> <Word>lengthof</Word> <Word>local</Word> <Word>low</Word> <Word>lowword</Word> <Word>lroffset</Word> <Word>lt</Word> <Word>macro</Word> <Word>mask</Word> <Word>mod</Word> <Word>.msfloat</Word> <Word>name</Word> <Word>ne</Word> <Word>offset</Word> <Word>opattr</Word> <Word>option</Word> <Word>org</Word> <Word>%out</Word> <Word>page</Word> <Word>popcontext</Word> <Word>proc</Word> <Word>proto</Word> <Word>ptr</Word> <Word>public</Word> <Word>purge</Word> <Word>pushcontext</Word> <Word>record</Word> <Word>repeat</Word> <Word>rept</Word> <Word>seg</Word> <Word>segment</Word> <Word>short</Word> <Word>size</Word> <Word>sizeof</Word> <Word>sizestr</Word> <Word>struc</Word> <Word>struct</Word> <Word>substr</Word> <Word>subtitle</Word> <Word>subttl</Word> <Word>textequ</Word> <Word>this</Word> <Word>title</Word> <Word>type</Word> <Word>typedef</Word> <Word>union</Word> <Word>while</Word> <Word>width</Word> </Keywords> <Keywords set="4"> <Word>$</Word> <Word>?</Word> <Word>@b</Word> <Word>@f</Word> <Word>addr</Word> <Word>basic</Word> <Word>byte</Word> <Word>c</Word> <Word>carry?</Word> <Word>dword</Word> <Word>far</Word> <Word>far16</Word> <Word>fortran</Word> <Word>fword</Word> <Word>near</Word> <Word>near16</Word> <Word>overflow?</Word> <Word>parity?</Word> <Word>pascal</Word> <Word>qword</Word> <Word>real4</Word> <Word>real8</Word> <Word>real10</Word> <Word>sbyte</Word> <Word>sdword</Word> <Word>sign?</Word> <Word>stdcall</Word> <Word>sword</Word> <Word>syscall</Word> <Word>tbyte</Word> <Word>vararg</Word> <Word>word</Word> <Word>zero?</Word> <Word>flat</Word> <Word>near32</Word> <Word>far32</Word> <Word>abs</Word> <Word>all</Word> <Word>assumes</Word> <Word>at</Word> <Word>casemap</Word> <Word>common</Word> <Word>compact</Word> <Word>cpu</Word> <Word>dotname</Word> <Word>emulator</Word> <Word>epilogue</Word> <Word>error</Word> <Word>export</Word> <Word>expr16</Word> <Word>expr32</Word> <Word>farstack</Word> <Word>flat</Word> <Word>forceframe</Word> <Word>huge</Word> <Word>language</Word> <Word>large</Word> <Word>listing</Word> <Word>ljmp</Word> <Word>loadds</Word> <Word>m510</Word> <Word>medium</Word> <Word>memory</Word> <Word>nearstack</Word> <Word>nodotname</Word> <Word>noemulator</Word> <Word>nokeyword</Word> <Word>noljmp</Word> <Word>nom510</Word> <Word>none</Word> <Word>nonunique</Word> <Word>nooldmacros</Word> <Word>nooldstructs</Word> <Word>noreadonly</Word> <Word>noscoped</Word> <Word>nosignextend</Word> <Word>nothing</Word> <Word>notpublic</Word> <Word>oldmacros</Word> <Word>oldstructs</Word> <Word>os_dos</Word> <Word>para</Word> <Word>private</Word> <Word>prologue</Word> <Word>radix</Word> <Word>readonly</Word> <Word>req</Word> <Word>scoped</Word> <Word>setif2</Word> <Word>smallstack</Word> <Word>tiny</Word> <Word>use16</Word> <Word>use32</Word> <Word>uses</Word> </Keywords> <Keywords set="5"> </Keywords> </Syntax> --- NEW FILE: perl.syn --- <Syntax> <Lexer> <Name>SCLEX_PERL</Name> <Property name="fold.comment">1</Property> <Property name="fold.compact">0</Property> </Lexer> <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="0"> <Name>Whitespace</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>808080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="34"> <Name>Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="35"> <Name>Bad Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="1"> <Name>Error</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FFFF00</Foreground> <Background>FF0000</Background> </Color> </Style> <Style number="2"> <Name>Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="3"> <Name>POD:</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>004000</Foreground> <Background>E0FFE0</Background> </Color> </Style> <Style number="4"> <Name>Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="5"> <Name>Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="6"> <Name>Strings</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="7"> <Name>Characters</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>009300</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="8"> <Name>Punctuation</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="9"> <Name>Preprocessor Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F7F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="10"> <Name>Operators</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>4B0082</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="11"> <Name>Identifiers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="12"> <Name>Scalars</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFE0E0</Background> </Color> </Style> <Style number="13"> <Name>Array</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFE0</Background> </Color> </Style> <Style number="14"> <Name>Hash</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFE0FF</Background> </Color> </Style> <Style number="15"> <Name>Symbol Table</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>E0E0E0</Background> </Color> </Style> <Style number="17"> <Name>Regular Expression</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>A0FFA0</Background> </Color> </Style> <Style number="18"> <Name>Substitution</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>F0E080</Background> </Color> </Style> <Style number="19"> <Name>Long Quote</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FFFF00</Foreground> <Background>8080A0</Background> </Color> </Style> <Style number="20"> <Name>Back Ticks</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FFFF00</Foreground> <Background>A08080</Background> </Color> </Style> <Style number="21"> <Name>Data Section</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>600000</Foreground> <Background>FFF0D8</Background> </Color> </Style> <Style number="22"> <Name>Here-doc (delimiter)</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>DDD0DD</Background> </Color> </Style> <Style number="23"> <Name>Here-doc (single quoted, q)</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>DDD0DD</Background> </Color> </Style> <Style number="24"> <Name>Here-doc (double quoted, qq)</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>DDD0DD</Background> </Color> </Style> <Style number="25"> <Name>Here-doc (back ticks, qx)</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>1</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>DDD0DD</Background> </Color> </Style> <Style number="26"> <Name>Single quoted string, generic</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="27"> <Name>qq = Double quoted string</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="28"> <Name>qx = Back ticks</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FFFF00</Foreground> <Background>A08080</Background> </Color> </Style> <Style number="29"> <Name>qr = Regex</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>A0FFA0</Background> </Color> </Style> <Style number="30"> <Name>qw = Array</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFE0</Background> </Color> </Style> <Keywords set="0"> <Word>continue</Word> <Word>do</Word> <Word>else</Word> <Word>elsif</Word> <Word>for</Word> <Word>foreach</Word> <Word>goto</Word> <Word>if</Word> <Word>last</Word> <Word>local</Word> <Word>map</Word> <Word>my</Word> <Word>next</Word> <Word>package</Word> <Word>redo</Word> <Word>require</Word> <Word>return</Word> <Word>sub</Word> <Word>unless</Word> <Word>until</Word> <Word>use</Word> <Word>while</Word> <Word>STDIN</Word> <Word>STDOUT</Word> <Word>STDERR</Word> <Word>ARGV</Word> <Word>ARGVOUT</Word> <Word>ENV</Word> <Word>INC</Word> <Word>SIG</Word> <Word>TRUE</Word> <Word>FALSE</Word> <Word>__FILE__</Word> <Word>__LINE__</Word> <Word>__PACKAGE__</Word> <Word>__END__</Word> <Word>__DATA__</Word> <Word>lt</Word> <Word>gt</Word> <Word>le</Word> <Word>ge</Word> <Word>eq</Word> <Word>ne</Word> <Word>cmp</Word> <Word>x</Word> <Word>not</Word> <Word>and</Word> <Word>or</Word> <Word>xor</Word> <Word>q</Word> <Word>qq</Word> <Word>qx</Word> <Word>qw</Word> <Word>$</Word> <Word>@</Word> <Word>%</Word> <Word>abs</Word> <Word>accept</Word> <Word>alarm</Word> <Word>atan2</Word> <Word>bind</Word> <Word>binmode</Word> <Word>bless</Word> <Word>caller</Word> <Word>chdir</Word> <Word>chmod</Word> <Word>chomp</Word> <Word>chop</Word> <Word>chown</Word> <Word>chr</Word> <Word>chroot</Word> <Word>close</Word> <Word>closedir</Word> <Word>connect</Word> <Word>cos</Word> <Word>crypt</Word> <Word>dbmclose</Word> <Word>dbmopen</Word> <Word>defined</Word> <Word>delete</Word> <Word>die</Word> <Word>dump</Word> <Word>each</Word> <Word>eof</Word> <Word>eval</Word> <Word>exec</Word> <Word>exists</Word> <Word>exit</Word> <Word>exp</Word> <Word>fcntl</Word> <Word>fileno</Word> <Word>flock</Word> <Word>fork</Word> <Word>format</Word> <Word>formline</Word> <Word>getc</Word> <Word>getlogin</Word> <Word>getpeername</Word> <Word>getpgrp</Word> <Word>getppid</Word> <Word>getpriority</Word> <Word>getpwnam</Word> <Word>getgrnam</Word> <Word>gethostbyname</Word> <Word>getnetbyname</Word> <Word>getprotobyname</Word> <Word>getpwuid</Word> <Word>getgrgid</Word> <Word>getservbyname</Word> <Word>gethostbyaddr</Word> <Word>getnetbyaddr</Word> <Word>getprotobynumber</Word> <Word>getservbyport</Word> <Word>getpwent</Word> <Word>getgrent</Word> <Word>gethostent</Word> <Word>getnetent</Word> <Word>getprotoent</Word> <Word>getservent</Word> <Word>setpwent</Word> <Word>setgrent</Word> <Word>sethostent</Word> <Word>setnetent</Word> <Word>setprotoent</Word> <Word>setservent</Word> <Word>endpwent</Word> <Word>endgrent</Word> <Word>endhostent</Word> <Word>endnetent</Word> <Word>endprotoent</Word> <Word>endservent</Word> <Word>getsockname</Word> <Word>getsockopt</Word> <Word>glob</Word> <Word>gmtime</Word> <Word>grep</Word> <Word>hex</Word> <Word>import</Word> <Word>index</Word> <Word>int</Word> <Word>ioctl</Word> <Word>join</Word> <Word>keys</Word> <Word>kill</Word> <Word>lc</Word> <Word>lcfirst</Word> <Word>length</Word> <Word>link</Word> <Word>listen</Word> <Word>localtime</Word> <Word>log</Word> <Word>lstat</Word> <Word>mkdir</Word> <Word>msgctl</Word> <Word>msgget</Word> <Word>msgsnd</Word> <Word>msgrcv</Word> <Word>no</Word> <Word>oct</Word> <Word>open</Word> <Word>opendir</Word> <Word>ord</Word> <Word>pack</Word> <Word>pipe</Word> <Word>pop</Word> <Word>pos</Word> <Word>print</Word> <Word>printf</Word> <Word>prototype</Word> <Word>push</Word> <Word>quotemeta</Word> <Word>rand</Word> <Word>read</Word> <Word>readdir</Word> <Word>readlink</Word> <Word>recv</Word> <Word>ref</Word> <Word>rename</Word> <Word>reset</Word> <Word>reverse</Word> <Word>rewinddir</Word> <Word>rindex</Word> <Word>rmdir</Word> <Word>scalar</Word> <Word>seek</Word> <Word>seekdir</Word> <Word>select</Word> <Word>semctl</Word> <Word>semget</Word> <Word>semop</Word> <Word>send</Word> <Word>setpgrp</Word> <Word>setpriority</Word> <Word>setsockopt</Word> <Word>shift</Word> <Word>shmctl</Word> <Word>shmget</Word> <Word>shmread</Word> <Word>shmwrite</Word> <Word>shutdown</Word> <Word>sin</Word> <Word>sleep</Word> <Word>socket</Word> <Word>socketpair</Word> <Word>sort</Word> <Word>splice</Word> <Word>split</Word> <Word>sprintf</Word> <Word>sqrt</Word> <Word>srand</Word> <Word>stat</Word> <Word>study</Word> <Word>substr</Word> <Word>symlink</Word> <Word>syscall</Word> <Word>sysopen</Word> <Word>sysread</Word> <Word>sysseek</Word> <Word>system</Word> <Word>syswrite</Word> <Word>tell</Word> <Word>telldir</Word> <Word>tie</Word> <Word>tied</Word> <Word>time</Word> <Word>times</Word> <Word>truncate</Word> <Word>uc</Word> <Word>ucfirst</Word> <Word>umask</Word> <Word>undef</Word> <Word>unlink</Word> <Word>unpack</Word> <Word>untie</Word> <Word>unshift</Word> <Word>utime</Word> <Word>values</Word> <Word>vec</Word> <Word>wait</Word> <Word>waitpid</Word> <Word>wantarray</Word> <Word>warn</Word> <Word>write</Word> </Keywords> </Syntax> --- NEW FILE: python.syn --- <Syntax> <Lexer> <Name>SCLEX_PYTHON</Name> <Property name="fold.comment.python">1</Property> <Property name="fold.quotes.python">1</Property> </Lexer> <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="0"> <Name>Whitespace</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="34"> <Name>Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="35"> <Name>Bad Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="1"> <Name>Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="2"> <Name>Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="3"> <Name>Strings</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="4"> <Name>Characters</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>009300</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="5"> <Name>Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="6"> <Name>Triple</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="7"> <Name>Triple Double</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="8"> <Name>Classname</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="9"> <Name>Defined Name</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F7F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="10"> <Name>Operators</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>4B0082</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="11"> <Name>Normal Text</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="12"> <Name>Comment Block</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="13"> <Name>String EOL</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>E0C0E0</Background> </Color> </Style> <Keywords set="0"> <Word>and</Word> <Word>assert</Word> <Word>break</Word> <Word>class</Word> <Word>continue</Word> <Word>def</Word> <Word>del</Word> <Word>elif</Word> <Word>else</Word> <Word>except</Word> <Word>exec</Word> <Word>finally</Word> <Word>for</Word> <Word>from</Word> <Word>global</Word> <Word>if</Word> <Word>import</Word> <Word>in</Word> <Word>is</Word> <Word>lambda</Word> <Word>not</Word> <Word>or</Word> <Word>pass</Word> <Word>print</Word> <Word>raise</Word> <Word>return</Word> <Word>self</Word> <Word>try</Word> <Word>while</Word> <Word>yield</Word> </Keywords> </Syntax> |
From: <moo...@us...> - 2003-12-12 14:54:15
|
Update of /cvsroot/anyedit/AnyEditBin/Config/Default In directory sc8-pr-cvs1:/tmp/cvs-serv907/Config/Default Modified Files: AnyEdit.cfg Log Message: Added 4 extra XML syntax files and updated AnyEdit.cfg to support them. (javascript.syn, masm.syn, perl.syn, python.syn) Index: AnyEdit.cfg =================================================================== RCS file: /cvsroot/anyedit/AnyEditBin/Config/Default/AnyEdit.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AnyEdit.cfg 12 Dec 2003 12:05:17 -0000 1.1 --- AnyEdit.cfg 12 Dec 2003 14:54:12 -0000 1.2 *************** *** 1,4 **** <Config> ! <Languages>2</Languages> <Language number="0"> <Name>Default</Name> --- 1,4 ---- <Config> ! <Languages>7</Languages> <Language number="0"> <Name>Default</Name> *************** *** 16,19 **** --- 16,39 ---- <AutoCompFile>java.acmp</AutoCompFile> <Extensions>java,jav</Extensions> + </Language> + <Language number="3"> + <Name>Perl</Name> + <SyntaxFile>perl.syn</SyntaxFile> + <Extensions>pl,pm,cgi,pod</Extensions> + </Language> + <Language number="4"> + <Name>Masm</Name> + <SyntaxFile>masm.syn</SyntaxFile> + <Extensions>asm</Extensions> + </Language> + <Language number="5"> + <Name>Python</Name> + <SyntaxFile>python.syn</SyntaxFile> + <Extensions>py</Extensions> + </Language> + <Language number="6"> + <Name>Javascript</Name> + <SyntaxFile>javascript.syn</SyntaxFile> + <Extensions>js</Extensions> </Language> </Config> |
From: <moo...@us...> - 2003-12-12 12:05:20
|
Update of /cvsroot/anyedit/AnyEditBin/Config/Default/Syntax In directory sc8-pr-cvs1:/tmp/cvs-serv1019/Config/Default/Syntax Added Files: cpp.syn default.syn java.syn Log Message: The new config and syntax files in XML format. The are needed for the sources with the new syntax handler. --- NEW FILE: cpp.syn --- <Syntax> <Lexer> <Name>SCLEX_CPP</Name> <Property name="fold.comment">1</Property> <Property name="fold.preprocessor">1</Property> </Lexer> <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="0"> <Name>Whitespace</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="34"> <Name>Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="35"> <Name>Bad Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="1"> <Name>Comment Block</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="2"> <Name>Single Line Comment</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="3"> <Name>Comment Doc</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F703F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="4"> <Name>Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F7F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="5"> <Name>Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>00007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="6"> <Name>Strings</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F007F</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="7"> <Name>Characters</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>009300</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="8"> <Name>UUIDs</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>804080</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="9"> <Name>Preprocessor Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7F7F00</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="10"> <Name>Operators</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>4B0082</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="11"> <Name>Normal Text</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="12"> <Name>String EOL</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>E0C0E0</Background> </Color> </Style> <Style number="13"> <Name>Verbatim</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>007F00</Foreground> <Background>E0FFE0</Background> </Color> </Style> <Style number="14"> <Name>Regular Expression</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F7F3F</Foreground> <Background>E0F0FF</Background> </Color> </Style> <Style number="15"> <Name>Comment Line Doc</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3F703F</Foreground> <Background>E0F0FF</Background> </Color> </Style> <Style number="16"> <Name>Keywords 2</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>B00040</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="17"> <Name>Comment Doc Keywords</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>3060A0</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="18"> <Name>Comment Doc Keywords Error</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>804020</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="19"> <Name>Global Class</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Keywords set="0"> <Word>asm</Word> <Word>auto</Word> <Word>bool</Word> <Word>break</Word> <Word>case</Word> <Word>catch</Word> <Word>char</Word> <Word>class</Word> <Word>const</Word> <Word>const_cast</Word> <Word>continue</Word> <Word>default</Word> <Word>delete</Word> <Word>do</Word> <Word>double</Word> <Word>dynamic_cast</Word> <Word>else</Word> <Word>enum</Word> <Word>explicit</Word> <Word>export</Word> <Word>extern</Word> <Word>false</Word> <Word>float</Word> <Word>for</Word> <Word>friend </Word> <Word>goto</Word> <Word>if</Word> <Word>inline</Word> <Word>int</Word> <Word>long</Word> <Word>mutable</Word> <Word>namespace</Word> <Word>new</Word> <Word>operator</Word> <Word>private</Word> <Word>protected</Word> <Word>public</Word> <Word>register</Word> <Word>reinterpret_cast</Word> <Word>return</Word> <Word>short</Word> <Word>signed</Word> <Word>sizeof</Word> <Word>static</Word> <Word>static_cast</Word> <Word>struct</Word> <Word>switch</Word> <Word>template</Word> <Word>this</Word> <Word>throw</Word> <Word>true</Word> <Word>try</Word> <Word>typedef</Word> <Word>typeid</Word> <Word>typename</Word> <Word>union</Word> <Word>unsigned</Word> <Word>using</Word> <Word>virtual</Word> <Word>void</Word> <Word>volatile</Word> <Word>wchar_t</Word> <Word>while</Word> </Keywords> <Keywords set="1"> <Word>__abstract</Word> <Word>__box</Word> <Word>__delegate</Word> <Word>__event</Word> <Word>__finally</Word> <Word>__gc</Word> <Word>__hook</Word> <Word>__identifier</Word> <Word>__interface</Word> <Word>__nogc</Word> <Word>__pin</Word> <Word>__property</Word> <Word>__sealed</Word> <Word>__try_cast</Word> <Word>__typeof</Word> <Word>__unhook</Word> <Word>__value</Word> </Keywords> <Keywords set="2"> <Word>a</Word> <Word>addindex</Word> <Word>addtogroup</Word> <Word>anchor</Word> <Word>arg</Word> <Word>attention</Word> <Word>author</Word> <Word>b</Word> <Word>brief</Word> <Word>bug</Word> <Word>c</Word> <Word>class</Word> <Word>code</Word> <Word>date</Word> <Word>def</Word> <Word>defgroup</Word> <Word>deprecated</Word> <Word>dontinclude</Word> <Word>e</Word> <Word>em</Word> <Word>endcode</Word> <Word>endhtmlonly</Word> <Word>endif</Word> <Word>endlatexonly</Word> <Word>endlink</Word> <Word>endverbatim</Word> <Word>enum</Word> <Word>example</Word> <Word>exception</Word> <Word>f$</Word> <Word>f[</Word> <Word>f]</Word> <Word>file</Word> <Word>fn</Word> <Word>hideinitializer</Word> <Word>htmlinclude</Word> <Word>htmlonly</Word> <Word>if</Word> <Word>image</Word> <Word>include</Word> <Word>ingroup</Word> <Word>internal</Word> <Word>invariant</Word> <Word>interface</Word> <Word>latexonly</Word> <Word>li</Word> <Word>line</Word> <Word>link</Word> <Word>mainpage</Word> <Word>name</Word> <Word>namespace</Word> <Word>nosubgrouping</Word> <Word>note</Word> <Word>overload</Word> <Word>p</Word> <Word>page</Word> <Word>par</Word> <Word>param</Word> <Word>post</Word> <Word>pre</Word> <Word>ref</Word> <Word>relates</Word> <Word>remarks</Word> <Word>return</Word> <Word>retval</Word> <Word>sa</Word> <Word>section</Word> <Word>see</Word> <Word>showinitializer</Word> <Word>since</Word> <Word>skip</Word> <Word>skipline</Word> <Word>struct</Word> <Word>subsection</Word> <Word>test</Word> <Word>throw</Word> <Word>todo</Word> <Word>typedef</Word> <Word>union</Word> <Word>until</Word> <Word>var</Word> <Word>verbatim</Word> <Word>verbinclude</Word> <Word>version</Word> <Word>warning</Word> <Word>weakgroup</Word> </Keywords> </Syntax> --- NEW FILE: default.syn --- <Syntax> <View> <SyntaxHighlighting>0</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>8</TabWidth> <UseTabs>0</UseTabs> <RightEdge>0</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>0</LineNumbers> <Bookmark>0</Bookmark> <Fold>0</Fold> </Margins> <StyleBits>5</StyleBits> <Style number="32"> <Name>Default</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>000000</Foreground> <Background>FFFFFF</Background> </Color> </Style> <Style number="33"> <Name>Line Numbers</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>7371BD</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="34"> <Name>Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>0000FF</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="35"> <Name>Bad Brace Matching</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>1</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>FF0000</Foreground> <Background>EFEFEF</Background> </Color> </Style> <Style number="37"> <Name>Indentation</Name> <Font> <Name>Verdana</Name> <Size>10</Size> <Bold>0</Bold> <Italic>0</Italic> <Underline>0</Underline> </Font> <Color> <Foreground>DCDCDC</Foreground> <Background>FFFFFF</Background> </Color> </Style> </Syntax> --- NEW FILE: java.syn --- <Syntax> <Lexer> <Name>SCLEX_CPP</Name> <Property name="fold.comment">1</Property> <Property name="fold.preprocessor">1</Property> </Lexer> <View> <SyntaxHighlighting>1</SyntaxHighlighting> <WordWrap>0</WordWrap> <TabWidth>4</TabWidth> <UseTabs>0</UseTabs> <RightEdge>1</RightEdge> <RightEdgeColumn>80</RightEdgeColumn> </View> <Margins> <LineNumbers>1</LineNumbers> <Bookmark>1</Bookmark> <Fold>1</Fold> </Margins> [...3266 lines suppressed...] <Word>showinitializer</Word> <Word>since</Word> <Word>skip</Word> <Word>skipline</Word> <Word>struct</Word> <Word>subsection</Word> <Word>test</Word> <Word>throw</Word> <Word>todo</Word> <Word>typedef</Word> <Word>union</Word> <Word>until</Word> <Word>var</Word> <Word>verbatim</Word> <Word>verbinclude</Word> <Word>version</Word> <Word>warning</Word> <Word>weakgroup</Word> </Keywords> </Syntax> |