diff options
Diffstat (limited to 'ldmicro/draw.cpp')
-rw-r--r-- | ldmicro/draw.cpp | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/ldmicro/draw.cpp b/ldmicro/draw.cpp index ed5c6be..d2feca2 100644 --- a/ldmicro/draw.cpp +++ b/ldmicro/draw.cpp @@ -48,7 +48,7 @@ BOOL ThisHighlighted; if((gx) >= DISPLAY_MATRIX_X_SIZE || (gx) < 0) oops(); \ if((gy) >= DISPLAY_MATRIX_Y_SIZE || (gy) < 0) oops(); \ } -/* + //----------------------------------------------------------------------------- // The display code is the only part of the program that knows how wide a // rung will be when it's displayed; so this is the only convenient place to @@ -68,7 +68,7 @@ static BOOL CheckBoundsUndoIfFails(int gx, int gy) } return FALSE; } -*/ + //----------------------------------------------------------------------------- // Determine the width, in leaf element units, of a particular subcircuit. // The width of a leaf is 1, the width of a series circuit is the sum of @@ -250,7 +250,7 @@ int ProgCountWidestRow(void) // Draw a vertical wire one leaf element unit high up from (cx, cy), where cx // and cy are in charcter units. //----------------------------------------------------------------------------- -/*static void VerticalWire(HCRDC Hcr, int cx, int cy) +static void VerticalWire(HCRDC Hcr, int cx, int cy) { int j; for(j = 1; j < POS_HEIGHT; j++) { @@ -881,32 +881,32 @@ cmp: } switch(leaf->selectedState) { case SELECTED_LEFT: - Cursor.left = x0 + FONT_WIDTH - 4 - xadj; - Cursor.top = y0 - FONT_HEIGHT/2; - Cursor.width = 2; - Cursor.height = POS_HEIGHT*FONT_HEIGHT; + Cursor.setLeft(x0 + FONT_WIDTH - 4 - xadj); + Cursor.setTop(y0 - FONT_HEIGHT/2); + Cursor.setWidth(2); + Cursor.setHeight(POS_HEIGHT*FONT_HEIGHT); break; case SELECTED_RIGHT: - Cursor.left = x0 + (POS_WIDTH-1)*FONT_WIDTH - 5; - Cursor.top = y0 - FONT_HEIGHT/2; - Cursor.width = 2; - Cursor.height = POS_HEIGHT*FONT_HEIGHT; + Cursor.setLeft(x0 + (POS_WIDTH-1)*FONT_WIDTH - 5); + Cursor.setTop(y0 - FONT_HEIGHT/2); + Cursor.setWidth(2); + Cursor.setHeight(POS_HEIGHT*FONT_HEIGHT); break; case SELECTED_ABOVE: - Cursor.left = x0 + FONT_WIDTH/2 - xadj; - Cursor.top = y0 - 2; - Cursor.width = (POS_WIDTH-2)*FONT_WIDTH + xadj; - Cursor.height = 2; + Cursor.setLeft(x0 + FONT_WIDTH/2 - xadj); + Cursor.setTop(y0 - 2); + Cursor.setWidth((POS_WIDTH-2)*FONT_WIDTH + xadj); + Cursor.setHeight(2); break; case SELECTED_BELOW: - Cursor.left = x0 + FONT_WIDTH/2 - xadj; - Cursor.top = y0 + (POS_HEIGHT-1)*FONT_HEIGHT + - FONT_HEIGHT/2 - 2; - Cursor.width = (POS_WIDTH-2)*(FONT_WIDTH) + xadj; - Cursor.height = 2; + Cursor.setLeft(x0 + FONT_WIDTH/2 - xadj); + Cursor.setTop(y0 + (POS_HEIGHT-1)*FONT_HEIGHT + + FONT_HEIGHT/2 - 2); + Cursor.setWidth((POS_WIDTH-2)*(FONT_WIDTH) + xadj); + Cursor.setHeight(2); break; default: @@ -915,7 +915,6 @@ cmp: return poweredAfter; } -*/ //----------------------------------------------------------------------------- // Draw a particular subcircuit with its top left corner at *cx and *cy (in // characters). If it is a leaf element then just print it and return; else @@ -934,7 +933,7 @@ BOOL DrawElement(HCRDC Hcr, int which, void *elem, int *cx, int *cy, BOOL powere ElemLeaf *leaf = (ElemLeaf *)elem; SetBkColor(DrawWindow,Hcr, InSimulationMode ? HighlightColours.simBg : HighlightColours.bg); - /*NormText(Hcr); + NormText(Hcr); if(elem == Selected && !InSimulationMode) { EmphText(Hcr); @@ -1044,7 +1043,7 @@ BOOL DrawElement(HCRDC Hcr, int which, void *elem, int *cx, int *cy, BOOL powere } - NormText(Hcr);*/ + NormText(Hcr); return poweredAfter; } |