#include "mfcpch.h"
#include "pageblk.h"
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <io.h>
#include "hpddef.h"
Go to the source code of this file.
#define G_START 0 |
Definition at line 18 of file pageblk.cpp.
Referenced by GRAPHICS_BLOCK::show_attrs().
#define I_START 1 |
#define QUOTE_IT | ( | parm | ) | #parm |
Definition at line 58 of file pageblk.cpp.
#define R_START 3 |
#define S_START 5 |
void delete_all_in | ( | PAGE_BLOCK * | pblock, | |
POLY_BLOCK * | delete_area | |||
) |
FIX: Given an area to delete, deletes all objects overlaped.
Definition at line 431 of file pageblk.cpp.
References POLY_BLOCK::contains(), delete_all_in(), and POLY_BLOCK::overlap().
Referenced by delete_all_in().
00431 { 00432 PAGE_BLOCK_IT c; 00433 INT16 i, pnum; 00434 00435 c.set_to_list (pblock->child ()); 00436 pnum = pblock->child ()->length (); 00437 for (i = 0; i < pnum; i++, c.forward ()) { 00438 if (delete_area->contains (c.data ())) 00439 c.extract ()->pb_delete (); 00440 else if (delete_area->overlap (c.data ())) 00441 delete_all_in (c.data (), delete_area); 00442 } 00443 }
void delete_all_tr_in | ( | TEXT_BLOCK * | tblock, | |
POLY_BLOCK * | delete_area | |||
) |
FIX: ??
Text regions
Definition at line 635 of file pageblk.cpp.
References POLY_BLOCK::contains(), POLY_BLOCK::overlap(), and TEXT_BLOCK::regions().
00635 { 00636 TEXT_REGION_IT t, tc; 00637 INT16 i, tnum, j, ttnum; 00638 00639 t.set_to_list (tblock->regions ()); 00640 tnum = tblock->regions ()->length (); 00641 for (i = 0; i < tnum; i++, t.forward ()) { 00642 if (delete_area->contains (t.data ())) 00643 delete (t.extract ()); 00644 else if (delete_area->overlap (t.data ())) { 00645 tc.set_to_list (t.data ()->regions ()); 00646 ttnum = t.data ()->regions ()->length (); 00647 for (j = 0; j < ttnum; j++, tc.forward ()) 00648 if (delete_area->contains (tc.data ())) 00649 delete (tc.extract ()); 00650 } 00651 } 00652 }
ELISTIZE_S | ( | PAGE_BLOCK | ) |
Destroy a list of this type.
Needed due to the awful switched nature of the PAGE_BLOCK class.
Definition at line 26 of file pageblk.cpp.
References PB_GRAPHICS, PB_IMAGE, PB_RULES, PB_SCRIBBLE, PB_TEXT, and PB_WEIRD.
00032 { 00033 switch (pb_type) { 00034 case PB_TEXT: 00035 delete ((TEXT_BLOCK *) this); 00036 break; 00037 case PB_GRAPHICS: 00038 delete ((GRAPHICS_BLOCK *) this); 00039 break; 00040 case PB_IMAGE: 00041 delete ((IMAGE_BLOCK *) this); 00042 break; 00043 case PB_RULES: 00044 delete ((RULE_BLOCK *) this); 00045 break; 00046 case PB_SCRIBBLE: 00047 delete ((SCRIBBLE_BLOCK *) this); 00048 break; 00049 case PB_WEIRD: 00050 delete ((WEIRD_BLOCK *) this); 00051 break; 00052 default: 00053 break; 00054 } 00055 }
Print info on background.
What's this doing here?
Definition at line 941 of file pageblk.cpp.
References backlabel, BITS16::bit(), f, and NUM_BACKGROUNDS.
Referenced by SCRIBBLE_BLOCK::show_attrs(), GRAPHICS_BLOCK::show_attrs(), and TEXT_BLOCK::show_attrs().
00941 { 00942 int i; 00943 00944 f->dprintf ("Background is \n"); 00945 for (i = 0; i < NUM_BACKGROUNDS; i++) { 00946 if (background.bit (i)) 00947 f->dprintf ("%s, ", backlabel[i]); 00948 } 00949 00950 f->dprintf ("\n"); 00951 00952 }
void show_all_in | ( | PAGE_BLOCK * | pblock, | |
POLY_BLOCK * | show_area, | |||
DEBUG_WIN * | f | |||
) |
FIX: Recursively dig into blocks and show info about them (??).
Definition at line 413 of file pageblk.cpp.
References POLY_BLOCK::contains(), f, POLY_BLOCK::overlap(), and show_all_in().
Referenced by show_all_in().
00413 { 00414 PAGE_BLOCK_IT c; 00415 INT16 i, pnum; 00416 00417 c.set_to_list (pblock->child ()); 00418 pnum = pblock->child ()->length (); 00419 for (i = 0; i < pnum; i++, c.forward ()) { 00420 if (show_area->contains (c.data ())) 00421 c.data ()->show_attrs (f); 00422 else if (show_area->overlap (c.data ())) 00423 show_all_in (c.data (), show_area, f); 00424 } 00425 }
DLLSYM void show_all_tr_in | ( | TEXT_BLOCK * | tblock, | |
POLY_BLOCK * | show_area, | |||
DEBUG_WIN * | f | |||
) |
FIX: ??
Text regions
Definition at line 608 of file pageblk.cpp.
References POLY_BLOCK::contains(), f, POLY_BLOCK::overlap(), and TEXT_BLOCK::regions().
00610 { 00611 TEXT_REGION_IT t, tc; 00612 INT16 i, tnum, j, ttnum; 00613 00614 t.set_to_list (tblock->regions ()); 00615 tnum = tblock->regions ()->length (); 00616 for (i = 0; i < tnum; i++, t.forward ()) { 00617 if (show_area->contains (t.data ())) 00618 t.data ()->show_attrs (f); 00619 else if (show_area->overlap (t.data ())) { 00620 tc.set_to_list (t.data ()->regions ()); 00621 ttnum = t.data ()->regions ()->length (); 00622 for (j = 0; j < ttnum; j++, tc.forward ()) 00623 if (show_area->contains (tc.data ())) 00624 tc.data ()->show_attrs (f); 00625 } 00626 } 00627 }
PAGE_BLOCK* smallest_containing | ( | PAGE_BLOCK * | pblock, | |
POLY_BLOCK * | other | |||
) |
FIX: recursively (??) find smallest block (??).
Definition at line 449 of file pageblk.cpp.
References smallest_containing().
Referenced by smallest_containing().
00449 { 00450 PAGE_BLOCK_IT c; 00451 00452 c.set_to_list (pblock->child ()); 00453 if (c.empty ()) 00454 return (pblock); 00455 00456 for (c.mark_cycle_pt (); !c.cycled_list (); c.forward ()) 00457 if (c.data ()->contains (other)) 00458 return (smallest_containing (c.data (), other)); 00459 00460 return (pblock); 00461 }
char backlabel[NUM_BACKGROUNDS][MAXLENGTH] |
char blabel[NUM_BLOCK_ATTR][4][MAXLENGTH] |
FIX: no idea.
Definition at line 136 of file labls.cpp.
Referenced by RULE_BLOCK::show_attrs(), GRAPHICS_BLOCK::show_attrs(), IMAGE_BLOCK::show_attrs(), and SCRIBBLE_BLOCK::show_attrs().