From: <ct...@us...> - 2011-08-08 14:43:28
|
Revision: 1772 http://colorer.svn.sourceforge.net/colorer/?rev=1772&view=rev Author: ctapmex Date: 2011-08-08 14:43:20 +0000 (Mon, 08 Aug 2011) Log Message: ----------- finish colorer TrueMod -> Far TrueMod Modified Paths: -------------- trunk/far3colorer/changelog trunk/far3colorer/far3sdk/farcolor.hpp trunk/far3colorer/far3sdk/plugin.hpp trunk/far3colorer/src/FarEditor.cpp trunk/far3colorer/src/FarEditorSet.cpp Modified: trunk/far3colorer/changelog =================================================================== --- trunk/far3colorer/changelog 2011-08-05 05:29:55 UTC (rev 1771) +++ trunk/far3colorer/changelog 2011-08-08 14:43:20 UTC (rev 1772) @@ -1,5 +1,9 @@ $Revision$ $Author$ $Date$ + 1. доделан truemod. (остался крест для него) + +#Revision: 1771 + #Author: ctapmex Date: 2011-08-05 11:29:55 +0600 (Пт, 05 авг 2011) 1. защита от использования на far2 #Revision: 1770 Modified: trunk/far3colorer/far3sdk/farcolor.hpp =================================================================== --- trunk/far3colorer/far3sdk/farcolor.hpp 2011-08-05 05:29:55 UTC (rev 1771) +++ trunk/far3colorer/far3sdk/farcolor.hpp 2011-08-08 14:43:20 UTC (rev 1772) @@ -4,7 +4,7 @@ /* farcolor.hpp - Colors Index for FAR Manager 3.0 build 2130 + Colors Index for FAR Manager 3.0 build 2139 HKCU\Software\Far Manager\Colors\CurrentPalette */ Modified: trunk/far3colorer/far3sdk/plugin.hpp =================================================================== --- trunk/far3colorer/far3sdk/plugin.hpp 2011-08-05 05:29:55 UTC (rev 1771) +++ trunk/far3colorer/far3sdk/plugin.hpp 2011-08-08 14:43:20 UTC (rev 1772) @@ -5,7 +5,7 @@ /* plugin.hpp - Plugin API for Far Manager 3.0 build 2130 + Plugin API for Far Manager 3.0 build 2139 */ /* @@ -43,7 +43,7 @@ #define FARMANAGERVERSION_MAJOR 3 #define FARMANAGERVERSION_MINOR 0 #define FARMANAGERVERSION_REVISION 0 -#define FARMANAGERVERSION_BUILD 2130 +#define FARMANAGERVERSION_BUILD 2139 #define FARMANAGERVERSION_STAGE VS_RELEASE #ifndef RC_INVOKED @@ -82,6 +82,19 @@ void* Reserved; }; +#define INDEXMASK 0x0000000f +#define COLORMASK 0x00ffffff +#define ALPHAMASK 0xff000000 + +#define INDEXVALUE(x) ((x)&INDEXMASK) +#define COLORVALUE(x) ((x)&COLORMASK) +#define ALPHAVALUE(x) ((x)&ALPHAMASK) + +#define IS_OPAQUE(x) (ALPHAVALUE(x)==ALPHAMASK) +#define IS_TRANSPARENT(x) (!ALPHAVALUE(x)) +#define MAKE_OPAQUE(x) (x|=ALPHAMASK) +#define MAKE_TRANSPARENT(x) (x&=COLORMASK) + typedef unsigned __int64 COLORDIALOGFLAGS; static const COLORDIALOGFLAGS CDF_NONE = 0; Modified: trunk/far3colorer/src/FarEditor.cpp =================================================================== --- trunk/far3colorer/src/FarEditor.cpp 2011-08-05 05:29:55 UTC (rev 1771) +++ trunk/far3colorer/src/FarEditor.cpp 2011-08-08 14:43:20 UTC (rev 1772) @@ -206,8 +206,8 @@ vertCrossColor = convert(StyledRegion::cast(baseEditor->rd_def_VertCross)); //TODO - //if (horzCrossColor.concolor == 0) horzCrossColor.concolor = 0x0E; - //if (vertCrossColor.concolor == 0) vertCrossColor.concolor = 0x0E; + if (!horzCrossColor.BackgroundColor && !horzCrossColor.ForegroundColor) horzCrossColor.ForegroundColor = 0xE; + if (!vertCrossColor.BackgroundColor && !vertCrossColor.ForegroundColor) vertCrossColor.ForegroundColor = 0xE; } void FarEditor::matchPair() @@ -1139,10 +1139,13 @@ int fore = (newfore != -1) ? newfore : rdBackground->fore; int back = (newback != -1) ? newback : rdBackground->back; - + if (rd != NULL){ col.ForegroundColor = rd->fore; col.BackgroundColor = rd->back; + if (rd->style&StyledRegion::RD_BOLD) col.Flags|=FCF_FG_BOLD; + if (rd->style&StyledRegion::RD_ITALIC) col.Flags|=FCF_FG_ITALIC; + if (rd->style&StyledRegion::RD_UNDERLINE) col.Flags|=FCF_FG_UNDERLINE; } if (rd == NULL || !rd->bfore) @@ -1157,12 +1160,6 @@ col.BackgroundColor=revertRGB(col.BackgroundColor); } - if (rd != NULL){ - if (rd->style&StyledRegion::RD_BOLD) col.Flags|=FCF_FG_BOLD; - if (rd->style&StyledRegion::RD_ITALIC) col.Flags|=FCF_FG_ITALIC; - if (rd->style&StyledRegion::RD_UNDERLINE) col.Flags|=FCF_FG_UNDERLINE; - } - return col; } Modified: trunk/far3colorer/src/FarEditorSet.cpp =================================================================== --- trunk/far3colorer/src/FarEditorSet.cpp 2011-08-05 05:29:55 UTC (rev 1771) +++ trunk/far3colorer/src/FarEditorSet.cpp 2011-08-08 14:43:20 UTC (rev 1772) @@ -1109,8 +1109,8 @@ fsc.Flags = FSETCLR_REDRAW; fsc.ColorsCount = 1; fsc.StartIndex = COL_EDITORTEXT; - fc.BackgroundColor = def_text->back; - fc.ForegroundColor = def_text->fore; + fc.BackgroundColor = revertRGB(def_text->back); + fc.ForegroundColor = revertRGB(def_text->fore); if (TrueModOn){ fc.Flags = 0; }else{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |