Revision: 2128 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2128&view=re... Author: cesspit Date: 2011-08-07 15:11:37 +0000 (Sun, 07 Aug 2011)
Log Message: ----------- debugger plugin: - xpm-s for margin markers
Modified Paths: -------------- trunk/geany-plugins/debugger/src/markers.c
Added Paths: ----------- trunk/geany-plugins/debugger/src/xpm/ trunk/geany-plugins/debugger/src/xpm/arrow_1_disable.xpm trunk/geany-plugins/debugger/src/xpm/arrow_1_yellow.xpm trunk/geany-plugins/debugger/src/xpm/breakpoint.xpm trunk/geany-plugins/debugger/src/xpm/breakpoint_condition.xpm trunk/geany-plugins/debugger/src/xpm/breakpoint_disabled.xpm
Modified: trunk/geany-plugins/debugger/src/markers.c =================================================================== --- trunk/geany-plugins/debugger/src/markers.c 2011-08-06 21:58:41 UTC (rev 2127) +++ trunk/geany-plugins/debugger/src/markers.c 2011-08-07 15:11:37 UTC (rev 2128) @@ -30,19 +30,21 @@ #include "breakpoint.h" #include "breakpoints.h"
+#include "xpm/breakpoint.xpm" +#include "xpm/breakpoint_disabled.xpm" +#include "xpm/breakpoint_condition.xpm" + +#include "xpm/arrow_1_disable.xpm" +#include "xpm/arrow_1_yellow.xpm" + /* markers identifiers */ #define M_FIRST 12 #define M_BP_ENABLED M_FIRST #define M_BP_DISABLED (M_FIRST + 1) -#define M_CI_BACKGROUND (M_FIRST + 2) -#define M_BP_ENABLED_CONDITIONAL (M_FIRST + 3) -#define M_BP_ENABLED_HITS (M_FIRST + 4) -#define M_BP_ENABLED_HITS_CONDITIONAL (M_FIRST + 5) -#define M_BP_DISABLED_CONDITIONAL (M_FIRST + 6) -#define M_BP_DISABLED_HITS (M_FIRST + 7) -#define M_BP_DISABLED_HITS_CONDITIONAL (M_FIRST + 8) -#define M_CI_ARROW (M_FIRST + 9) -#define M_FRAME (M_FIRST + 10) +#define M_BP_CONDITIONAL (M_FIRST + 2) +#define M_CI_BACKGROUND (M_FIRST + 3) +#define M_CI_ARROW (M_FIRST + 4) +#define M_FRAME (M_FIRST + 5)
#define MARKER_PRESENT(mask, marker) (mask && (0x01 << marker))
@@ -56,6 +58,9 @@ #define WHITE RGB(255,255,255) #define PINK RGB(255,192,203)
+#define BP_BACKGROUND RGB(255,246,33) + + #define LIGHT_YELLOW RGB(200,200,0)
/* @@ -64,41 +69,14 @@ void markers_set_for_document(ScintillaObject *sci) { /* enabled breakpoint */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_BP_ENABLED, SC_MARK_ROUNDRECT); - scintilla_send_message(sci, SCI_MARKERSETBACK, M_BP_ENABLED, RED); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_BP_ENABLED, RED); + scintilla_send_message(sci, SCI_MARKERDEFINEPIXMAP, M_BP_ENABLED, (long)breakpoint_xpm); - /* enabled breakpoint - condition */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_BP_ENABLED_CONDITIONAL, SC_MARK_ROUNDRECT); - scintilla_send_message(sci, SCI_MARKERSETBACK, M_BP_ENABLED_CONDITIONAL, BLUE); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_BP_ENABLED_CONDITIONAL, BLUE); - - /* enabled breakpoint - hits */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_BP_ENABLED_HITS, SC_MARK_ROUNDRECT); - scintilla_send_message(sci, SCI_MARKERSETBACK, M_BP_ENABLED_HITS, YELLOW); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_BP_ENABLED_HITS, YELLOW); - - /* enabled breakpoint - hits, condition */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_BP_ENABLED_HITS_CONDITIONAL, SC_MARK_ROUNDRECT); - scintilla_send_message(sci, SCI_MARKERSETBACK, M_BP_ENABLED_HITS_CONDITIONAL, GREEN); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_BP_ENABLED_HITS_CONDITIONAL, GREEN); - /* disabled breakpoint */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_BP_DISABLED, SC_MARK_ROUNDRECT); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_BP_DISABLED, RED); + scintilla_send_message(sci, SCI_MARKERDEFINEPIXMAP, M_BP_DISABLED, (long)breakpoint_disabled_xpm);
- /* disabled breakpoint - condition */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_BP_DISABLED_CONDITIONAL, SC_MARK_ROUNDRECT); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_BP_DISABLED_CONDITIONAL, BLUE); + /* conditional breakpoint */ + scintilla_send_message(sci, SCI_MARKERDEFINEPIXMAP, M_BP_CONDITIONAL, (long)breakpoint_condition_xpm);
- /* disabled breakpoint - hits */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_BP_DISABLED_HITS, SC_MARK_ROUNDRECT); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_BP_DISABLED_HITS, YELLOW); - - /* disabled breakpoint - hits, condition */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_BP_DISABLED_HITS_CONDITIONAL, SC_MARK_ROUNDRECT); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_BP_DISABLED_HITS_CONDITIONAL, GREEN); - /* currect instruction background */ scintilla_send_message(sci, SCI_MARKERDEFINE, M_CI_BACKGROUND, SC_MARK_BACKGROUND); scintilla_send_message(sci, SCI_MARKERSETBACK, M_CI_BACKGROUND, YELLOW); @@ -106,15 +84,10 @@ scintilla_send_message(sci, SCI_MARKERSETALPHA, M_CI_BACKGROUND, 75);
/* currect instruction arrow */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_CI_ARROW, SC_MARK_SHORTARROW); - scintilla_send_message(sci, SCI_MARKERSETBACK, M_CI_ARROW, YELLOW); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_CI_ARROW, BLACK); - scintilla_send_message(sci, SCI_MARKERSETALPHA, M_CI_ARROW, 75); + scintilla_send_message(sci, SCI_MARKERDEFINEPIXMAP, M_CI_ARROW, (long)arrow_1_yellow_xpm);
/* frame marker current */ - scintilla_send_message(sci, SCI_MARKERDEFINE, M_FRAME, SC_MARK_SHORTARROW); - scintilla_send_message(sci, SCI_MARKERSETBACK, M_FRAME, WHITE); - scintilla_send_message(sci, SCI_MARKERSETFORE, M_FRAME, BLACK); + scintilla_send_message(sci, SCI_MARKERDEFINEPIXMAP, M_FRAME, (long)arrow_1_disable_xpm); }
/* @@ -139,38 +112,18 @@ GeanyDocument *doc = document_find_by_filename(bp->file); if (doc) { - int marker; - if (bp->enabled) + if (!bp->enabled) { - if (strlen(bp->condition)) - { - marker = bp->hitscount ? M_BP_ENABLED_HITS_CONDITIONAL : M_BP_ENABLED_CONDITIONAL; - } - else if (bp->hitscount) - { - marker = M_BP_ENABLED_HITS; - } - else - { - marker = M_BP_ENABLED; - } + sci_set_marker_at_line(doc->editor->sci, bp->line - 1, M_BP_DISABLED); } + else if (strlen(bp->condition) || bp->hitscount) + { + sci_set_marker_at_line(doc->editor->sci, bp->line - 1, M_BP_CONDITIONAL); + } else { - if (strlen(bp->condition)) - { - marker = bp->hitscount ? M_BP_DISABLED_HITS_CONDITIONAL : M_BP_DISABLED_CONDITIONAL; - } - else if (bp->hitscount) - { - marker = M_BP_DISABLED_HITS; - } - else - { - marker = M_BP_DISABLED; - } + sci_set_marker_at_line(doc->editor->sci, bp->line - 1, M_BP_ENABLED); } - sci_set_marker_at_line(doc->editor->sci, bp->line - 1, marker); } }
@@ -181,13 +134,8 @@ { static int breakpoint_markers[] = { M_BP_ENABLED, - M_BP_ENABLED_CONDITIONAL, - M_BP_ENABLED_HITS, - M_BP_ENABLED_HITS_CONDITIONAL, M_BP_DISABLED, - M_BP_DISABLED_CONDITIONAL, - M_BP_DISABLED_HITS, - M_BP_DISABLED_HITS_CONDITIONAL + M_BP_CONDITIONAL };
GeanyDocument *doc = document_find_by_filename(bp->file);
Added: trunk/geany-plugins/debugger/src/xpm/arrow_1_disable.xpm =================================================================== --- trunk/geany-plugins/debugger/src/xpm/arrow_1_disable.xpm (rev 0) +++ trunk/geany-plugins/debugger/src/xpm/arrow_1_disable.xpm 2011-08-07 15:11:37 UTC (rev 2128) @@ -0,0 +1,29 @@ +/* XPM */ +static char * arrow_1_disable_xpm[] = { +"16 16 10 1", +" c None", +". c #938E12", +"+ c #959011", +"@ c #928E12", +"# c #949011", +"$ c #938F11", +"% c #948F11", +"& c #938E11", +"* c #928E11", +"= c #938F12", +" ", +" . ", +" .. ", +" ++@ ", +" #$#. ", +" #$#.. ", +" %%%%%%%%& %.% ", +" %******** %%% ", +" =@ ===", +" ========= ==. ", +" ......... ... ", +" ..... ", +" @@.@ ", +" @.@ ", +" .@ ", +" @ "};
Added: trunk/geany-plugins/debugger/src/xpm/arrow_1_yellow.xpm =================================================================== --- trunk/geany-plugins/debugger/src/xpm/arrow_1_yellow.xpm (rev 0) +++ trunk/geany-plugins/debugger/src/xpm/arrow_1_yellow.xpm 2011-08-07 15:11:37 UTC (rev 2128) @@ -0,0 +1,64 @@ +/* XPM */ +static char * arrow_1_yellow_xpm[] = { +"16 16 45 1", +" c None", +". c #948F11", +"+ c #959011", +"@ c #949011", +"# c #E8DF29", +"$ c #E1D829", +"% c #E3D927", +"& c #E1D529", +"* c #DDDA21", +"= c #DCD821", +"- c #DCD621", +"; c #DBD521", +"> c #DAD323", +", c #DAD227", +"' c #D9CF27", +") c #D8CF27", +"! c #D7CD27", +"~ c #D6CB29", +"{ c #D6C92B", +"] c #938F12", +"^ c #BEBA1D", +"/ c #BDB91D", +"( c #BDB71D", +"_ c #BDB621", +": c #BDB321", +"< c #BBB321", +"[ c #BAB121", +"} c #BAB023", +"| c #B9AE25", +"1 c #B9AD25", +"2 c #B7AC27", +"3 c #B7AA27", +"4 c #A8A418", +"5 c #A7A21A", +"6 c #A7A01D", +"7 c #A79F1D", +"8 c #A59F1D", +"9 c #A59D1D", +"0 c #A49B1F", +"a c #A49A21", +"b c #A49921", +"c c #A29821", +"d c #A29621", +"e c #938E12", +"f c #928E12", +" ", +" ", +" . ", +" +. ", +" @#. ", +" @#$@ ", +" ........%$&. ", +" .*=-;>,')!~{. ", +" ]^/(_:<[}|123] ", +" ]4567890abcd] ", +" eeeeeeeeddde ", +" edde ", +" fde ", +" .e ", +" e ", +" "};
Added: trunk/geany-plugins/debugger/src/xpm/breakpoint.xpm =================================================================== --- trunk/geany-plugins/debugger/src/xpm/breakpoint.xpm (rev 0) +++ trunk/geany-plugins/debugger/src/xpm/breakpoint.xpm 2011-08-07 15:11:37 UTC (rev 2128) @@ -0,0 +1,91 @@ +/* XPM */ +static char * breakpoint_xpm[] = { +"16 16 72 1", +" c None", +". c #772B1A", +"+ c #903B2D", +"@ c #F17A78", +"# c #C65C55", +"$ c #F17876", +"% c #FF7E7E", +"& c #FF7B7B", +"* c #C65750", +"= c #8F3A2C", +"- c #EF7573", +"; c #FD7B7B", +"> c #FD7878", +", c #FD7575", +"' c #FD7272", +") c #C5524B", +"! c #8E392C", +"~ c #E7716F", +"{ c #F47676", +"] c #F47373", +"^ c #F47070", +"/ c #F46D6D", +"( c #F46A6A", +"_ c #F46767", +": c #C04C45", +"< c #8B382A", +"[ c #DB6B69", +"} c #E77070", +"| c #E76D6D", +"1 c #E76A6A", +"2 c #E76868", +"3 c #E76565", +"4 c #E76161", +"5 c #E75F5F", +"6 c #E75D5D", +"7 c #B8453E", +"8 c #8D392B", +"9 c #DB6867", +"0 c #E56C6C", +"a c #E56A6A", +"b c #E56767", +"c c #E56363", +"d c #E56161", +"e c #E55E5E", +"f c #E55C5C", +"g c #E55959", +"h c #B8443D", +"i c #8A3729", +"j c #CD5D5B", +"k c #D66060", +"l c #D65E5E", +"m c #D65A5A", +"n c #D65858", +"o c #D65656", +"p c #D65353", +"q c #AF413A", +"r c #863326", +"s c #BB514F", +"t c #C25252", +"u c #C25050", +"v c #C24E4E", +"w c #C24C4C", +"x c #A33C36", +"y c #813023", +"z c #A54241", +"A c #AA4444", +"B c #AA4242", +"C c #953730", +"D c #7B2D1F", +"E c #893432", +"F c #822F28", +"G c #772B1D", +" . ", +" ... ", +" ..+.. ", +" ..+@#.. ", +" ..+$%&*.. ", +" ..=-;>,').. ", +" ..!~{]^/(_:.. ", +"..<[}|1234567.. ", +"..890abcdefgh.. ", +" ..ijklmnopq.. ", +" ..rstuvwx.. ", +" ..yzABC.. ", +" ..DEF.. ", +" ..G.. ", +" ... ", +" . "};
Added: trunk/geany-plugins/debugger/src/xpm/breakpoint_condition.xpm =================================================================== --- trunk/geany-plugins/debugger/src/xpm/breakpoint_condition.xpm (rev 0) +++ trunk/geany-plugins/debugger/src/xpm/breakpoint_condition.xpm 2011-08-07 15:11:37 UTC (rev 2128) @@ -0,0 +1,42 @@ +/* XPM */ +static char * breakpoint_condition_xpm[] = { +"16 16 23 1", +" c None", +". c #772B1A", +"+ c #903B2D", +"@ c #FFAA00", +"# c #C65C55", +"$ c #C65750", +"% c #8F3A2C", +"& c #C5524B", +"* c #8E392C", +"= c #C04C45", +"- c #8B382A", +"; c #B8453E", +"> c #8D392B", +", c #B8443D", +"' c #8A3729", +") c #B34B38", +"! c #863326", +"~ c #A33C36", +"{ c #813023", +"] c #A7592E", +"^ c #7B2D1F", +"/ c #822F28", +"( c #772B1D", +" . ", +" ... ", +" ..+.. ", +" ..+@#.. ", +" ..+@@@$.. ", +" ..%@@@@@&.. ", +" ..*@@@@@@@=.. ", +"..-@@@@@@@@@;.. ", +"..>@@@@@@@@@,.. ", +" ..'@@@@@@@).. ", +" ..!@@@@@~.. ", +" ..{@@@].. ", +" ..^@/.. ", +" ..(.. ", +" ... ", +" . "};
Added: trunk/geany-plugins/debugger/src/xpm/breakpoint_disabled.xpm =================================================================== --- trunk/geany-plugins/debugger/src/xpm/breakpoint_disabled.xpm (rev 0) +++ trunk/geany-plugins/debugger/src/xpm/breakpoint_disabled.xpm 2011-08-07 15:11:37 UTC (rev 2128) @@ -0,0 +1,21 @@ +/* XPM */ +static char * breakpoint_disabled_xpm[] = { +"16 16 2 1", +" c None", +". c #772B1A", +" .. ", +" .... ", +" ...... ", +" ... ... ", +" ... ... ", +" ... ... ", +" ... ... ", +"... ...", +"... ...", +" ... ... ", +" ... ... ", +" ... ... ", +" ... ... ", +" ...... ", +" .... ", +" .. "};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org