home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / code / wxwin140 / docs / hytext.xlp < prev    next >
Encoding:
Text File  |  1995-05-19  |  22.2 KB  |  831 lines

  1. \hy-10{100}{wxWindows Classes}
  2.  
  3.  
  4.   \hy-2{101}{wxHTMappingStructure: wxObject}
  5.  
  6.   \hy-2{115}{wxHyperTextMapping: wxList}
  7.  
  8.   \hy-2{139}{wxHyperTextWindow: wxCanvas}
  9.  
  10.   \hy-2{340}{wxTextChunk: wxObject}
  11.  
  12.  
  13. \hy-10{102}{wxHTMappingStructure: wxObject}
  14.  
  15. This class is used for storing mapping information for a block type.
  16.  
  17. \hy-2{103}{wxHTMappingStructure::wxHTMappingStructure}
  18.  
  19. \hy-2{106}{wxHTMappingStructure::~wxHTMappingStructure}
  20.  
  21. \hy-2{109}{wxHTMappingStructure::Copy}
  22.  
  23. \hy-2{112}{wxHTMappingStructure::GetFont}
  24.  
  25.  
  26. \hy-10{116}{wxHyperTextMapping: wxList}
  27.  
  28. An object of this class stores a list of block mapping structures. The
  29. programmer needs to call \hy-8{117}{wxHyperTextWindow::SetMapping} with an
  30. object of this class, to specify how blocks are interpreted; several
  31. instances of \hy-8{118}{wxHyperTextWindow} could make use of the same \hy-8{119}{
  32. wxHyperTextMapping}.
  33.  
  34. \hy-2{120}{wxHyperTextMapping::wxHyperTextMapping}
  35.  
  36. \hy-2{123}{wxHyperTextMapping::~wxHyperTextMapping}
  37.  
  38. \hy-2{126}{wxHyperTextMapping::AddMapping}
  39.  
  40. \hy-2{130}{wxHyperTextMapping::ClearMapping}
  41.  
  42. \hy-2{133}{wxHyperTextMapping::FindByName}
  43.  
  44. \hy-2{136}{wxHyperTextMapping::GetMapping}
  45.  
  46.  
  47. \hy-10{140}{wxHyperTextWindow: wxCanvas}
  48.  
  49. Objects of this class represent a canvas on which hypertext files are
  50. drawn.  Most of the functionality of the library is accessed through
  51. this class.
  52.  
  53. Note that the class defines behaviour for \hy-8{141}{OnEvent} and \hy-8{142}{OnPaint}.
  54.  
  55. \hy-2{143}{wxHyperTextWindow::wxHyperTextWindow}
  56.  
  57. \hy-2{147}{wxHyperTextWindow::~wxHyperTextWindow}
  58.  
  59. \hy-2{150}{wxHyperTextWindow::AddBlock}
  60.  
  61. \hy-2{155}{wxHyperTextWindow::ClearBlock}
  62.  
  63. \hy-2{160}{wxHyperTextWindow::ClearFile}
  64.  
  65. \hy-2{163}{wxHyperTextWindow::Compile}
  66.  
  67. \hy-2{171}{wxHyperTextWindow::DiscardEdits}
  68.  
  69. \hy-2{175}{wxHyperTextWindow::DisplayFile}
  70.  
  71. \hy-2{179}{wxHyperTextWindow::DisplayFileAt}
  72.  
  73. \hy-2{184}{wxHyperTextWindow::DisplayFileAtTop}
  74.  
  75. \hy-2{187}{wxHyperTextWindow::DisplayNextSection}
  76.  
  77. \hy-2{190}{wxHyperTextWindow::DisplayPreviousSection}
  78.  
  79. \hy-2{193}{wxHyperTextWindow::DrawOutline}
  80.  
  81. \hy-2{196}{wxHyperTextWindow::FindBlock}
  82.  
  83. \hy-2{199}{wxHyperTextWindow::FindBlockForSection}
  84.  
  85. \hy-2{205}{wxHyperTextWindow::FindChunkAtBlock}
  86.  
  87. \hy-2{210}{wxHyperTextWindow::FindChunkAtLine}
  88.  
  89. \hy-2{215}{wxHyperTextWindow::FindPosition}
  90.  
  91. \hy-2{218}{wxHyperTextWindow::GenerateId}
  92.  
  93. \hy-2{221}{wxHyperTextWindow::GetBlockText}
  94.  
  95. \hy-2{226}{wxHyperTextWindow::GetBlockType}
  96.  
  97. \hy-2{229}{wxHyperTextWindow::GetCurrentSectionNumber}
  98.  
  99. \hy-2{232}{wxHyperTextWindow::GetEditMode}
  100.  
  101. \hy-2{235}{wxHyperTextWindow::GetFirstSelection}
  102.  
  103. \hy-2{239}{wxHyperTextWindow::GetLinkTable}
  104.  
  105. \hy-2{244}{wxHyperTextWindow::GetNextSelection}
  106.  
  107. \hy-2{248}{wxHyperTextWindow::GetTitle}
  108.  
  109. \hy-2{251}{wxHyperTextWindow::LoadFile}
  110.  
  111. \hy-2{254}{wxHyperTextWindow::Modified}
  112.  
  113. \hy-2{257}{wxHyperTextWindow::OnBeginDragLeft}
  114.  
  115. \hy-2{260}{wxHyperTextWindow::OnBeginDragRight}
  116.  
  117. \hy-2{263}{wxHyperTextWindow::OnDragLeft}
  118.  
  119. \hy-2{272}{wxHyperTextWindow::OnDragRight}
  120.  
  121. \hy-2{281}{wxHyperTextWindow::OnEndDragLeft}
  122.  
  123. \hy-2{284}{wxHyperTextWindow::OnEndDragRight}
  124.  
  125. \hy-2{287}{wxHyperTextWindow::OnLeftClick}
  126.  
  127. \hy-2{290}{wxHyperTextWindow::OnRightClick}
  128.  
  129. \hy-2{293}{wxHyperTextWindow::OnSelectBlock}
  130.  
  131. \hy-2{296}{wxHyperTextWindow::RestoreSection}
  132.  
  133. \hy-2{304}{wxHyperTextWindow::SaveFile}
  134.  
  135. \hy-2{307}{wxHyperTextWindow::SaveSection}
  136.  
  137. \hy-2{314}{wxHyperTextWindow::SelectBlock}
  138.  
  139. \hy-2{321}{wxHyperTextWindow::SetBlockType}
  140.  
  141. \hy-2{324}{wxHyperTextWindow::SetEditMode}
  142.  
  143. \hy-2{327}{wxHyperTextWindow::SetIndexWriting}
  144.  
  145. \hy-2{331}{wxHyperTextWindow::SetMapping}
  146.  
  147. \hy-2{334}{wxHyperTextWindow::SetMargins}
  148.  
  149. \hy-2{337}{wxHyperTextWindow::SetTitle}
  150.  
  151.  
  152. \hy-10{341}{wxTextChunk: wxObject}
  153.  
  154. This class is used for storing a text string which has all the
  155. same font and colour attributes. The entire hypertext file is broken
  156. up into a list of these fragments, and the \hy-8{342}{Compile} function
  157. assigns actual font and colour attributes to each chunk.
  158. A text chunk may also mark the start of a line (each line has
  159. a special start line text chunk).
  160.  
  161. If a chunk represents the start of a block, the \hy-8{343}{block_id} is
  162. this block. For chunks within a block, the \hy-8{344}{block_id} is always
  163. the id of the block currently in scope. A text chunk which marks the
  164. end of a block has \hy-8{345}{block_id} set to the \hy-7{346}{next} block's id,
  165. but \hy-8{347}{end_block} set to the ending block's id. This is because a
  166. text chunk contains the \hy-7{348}{next} fragment of text, and an end block
  167. chunk has two purposes: to end one block, and continue another.
  168.  
  169. \hy-2{349}{wxTextChunk::wxTextChunk}
  170.  
  171. \hy-2{352}{wxTextChunk::~wxTextChunk}
  172.  
  173. \hy-2{355}{wxTextChunk::background_colour}
  174.  
  175. \hy-2{359}{wxTextChunk::block_id}
  176.  
  177. \hy-2{362}{wxTextChunk::block_type}
  178.  
  179. \hy-2{366}{wxTextChunk::chunk_type}
  180.  
  181. \hy-2{370}{wxTextChunk::colour}
  182.  
  183. \hy-2{374}{wxTextChunk::end_id}
  184.  
  185. \hy-2{378}{wxTextChunk::font}
  186.  
  187. \hy-2{382}{wxTextChunk::line_no}
  188.  
  189. \hy-2{385}{wxTextChunk::logical_op}
  190.  
  191. \hy-2{388}{wxTextChunk::selected}
  192.  
  193. \hy-2{391}{wxTextChunk::special_attribute}
  194.  
  195. \hy-2{394}{wxTextChunk::text}
  196.  
  197. \hy-2{397}{wxTextChunk::visibility}
  198.  
  199. \hy-10{104}{wxHTMappingStructure::wxHTMappingStructure}
  200.  
  201. \hy-8{105}{void wxHTMappingStructure(int blockType, int textSize, int textFamily, int textStyle,
  202. int textWeight, char *textColour, char *name, int attribute = wxHYPER_NONE,
  203. int visibility = TRUE)}
  204.  
  205. Constructor.
  206.  
  207. \hy-10{107}{wxHTMappingStructure::~wxHTMappingStructure}
  208.  
  209. \hy-8{108}{void ~wxHTMappingStructure(void)}
  210.  
  211. Destructor.
  212.  
  213. \hy-10{110}{wxHTMappingStructure::Copy}
  214.  
  215. \hy-8{111}{wxHTMappingStructure * Copy(void)}
  216.  
  217. Copies the structure.
  218.  
  219. \hy-10{113}{wxHTMappingStructure::GetFont}
  220.  
  221. \hy-8{114}{wxFont * GetFont(void)}
  222.  
  223. Finds or creates a font matching the characteristics stored in this
  224. structure.
  225.  
  226. \hy-10{121}{wxHyperTextMapping::wxHyperTextMapping}
  227.  
  228. \hy-8{122}{void wxHyperTextMapping(void)}
  229.  
  230. Constructor.
  231.  
  232. \hy-10{124}{wxHyperTextMapping::~wxHyperTextMapping}
  233.  
  234. \hy-8{125}{void ~wxHyperTextMapping(void)}
  235.  
  236. Destructor.
  237.  
  238. \hy-10{127}{wxHyperTextMapping::AddMapping}
  239.  
  240. \hy-8{128}{void AddMapping(int blockType, int textSize, int textFamily, int textStyle,
  241. int textWeight, char * textColour, char *name, int attribute = -1,
  242. int visibility = TRUE)}
  243.  
  244. Adds a mapping for a block type. \hy-7{129}{blockType} must be unique, and
  245. any parameters which have the default value (-1 for integers, NULL for
  246. strings) will be instantiated according to the context of the block.
  247. That is, if a block is nested with another block, the outer block's
  248. characteristics are used to fill in the default values.
  249.  
  250. See wxhelp.cc for examples.
  251.  
  252. \hy-10{131}{wxHyperTextMapping::ClearMapping}
  253.  
  254. \hy-8{132}{void ClearMapping(void)}
  255.  
  256. Deletes all members of the mapping list.
  257.  
  258. \hy-10{134}{wxHyperTextMapping::FindByName}
  259.  
  260. \hy-8{135}{void FindByName(char *name)}
  261.  
  262. Finds a mapping structure by name.
  263.  
  264. \hy-10{137}{wxHyperTextMapping::GetMapping}
  265.  
  266. \hy-8{138}{Bool GetMapping(int blockType, int * textSize, int *textFamily, int *textStyle,
  267. int *textWeight, char **textColour, char **name, int *attribute,
  268. int *visibility)}
  269.  
  270. Gets mapping values for a given block, returning FALSE if not found.
  271.  
  272. \hy-10{144}{wxHyperTextWindow::wxHyperTextWindow}
  273.  
  274. \hy-8{145}{void wxHyperTextWindow(wxFrame *parent, int x, int y,
  275. int w, int h, int style)}
  276.  
  277. Constructor; for details see \hy-8{146}{wxCanvas} in the wxWindows class reference.
  278.  
  279. \hy-10{148}{wxHyperTextWindow::~wxHyperTextWindow}
  280.  
  281. \hy-8{149}{void ~wxHyperTextWindow(void)}
  282.  
  283. Destructor.
  284.  
  285. \hy-10{151}{wxHyperTextWindow::AddBlock}
  286.  
  287. \hy-8{152}{Bool AddBlock(int xStart, int yStart, int xEnd, int yEnd, int blockType, int blockId)}
  288.  
  289. Adds a block from the first row/column to the second row/column, with
  290. given type and unique identifier. The display will not change until
  291. the functions \hy-8{153}{Compile} and \hy-8{154}{DisplayFileAt} are called.
  292.  
  293. \hy-10{156}{wxHyperTextWindow::ClearBlock}
  294.  
  295. \hy-8{157}{Bool ClearBlock(int blockId)}
  296.  
  297. Clears the given block. The display will not change until the
  298. functions \hy-8{158}{Compile} and \hy-8{159}{DisplayFileAt} are called.
  299.  
  300. \hy-10{161}{wxHyperTextWindow::ClearFile}
  301.  
  302. \hy-8{162}{void ClearFile(void)}
  303.  
  304. Clears the current hypertext file.
  305.  
  306. \hy-10{164}{wxHyperTextWindow::Compile}
  307.  
  308. \hy-8{165}{void Compile(void)}
  309.  
  310. Compiles the current hypertext file, that is, traverses the block
  311. structure of the file associating actual fonts and other attributes to
  312. text chunks. This must be done before a file may be displayed, and may
  313. also require the functions \hy-8{166}{SaveSection} and \hy-8{167}{RestoreSection}
  314. to be called in order to save and restore the current position in the
  315. file, since compilation destroys section pointers.
  316.  
  317. After a \hy-8{168}{Compile} (which is necessary after marking up or any
  318. operation which affects the display) the file must be displayed with
  319. \hy-8{169}{DisplayFileAt} or \hy-8{170}{RestoreSection}.
  320.  
  321. \hy-10{172}{wxHyperTextWindow::DiscardEdits}
  322.  
  323. \hy-8{173}{void DiscardEdits(void)}
  324.  
  325. Discards any edits (just sets the internal \hy-7{174}{modified} flag to FALSE).
  326.  
  327. \hy-10{176}{wxHyperTextWindow::DisplayFile}
  328.  
  329. \hy-8{177}{void DisplayFile(void)}
  330.  
  331. Draw the text at the point found by \hy-8{178}{DisplayFileAt}.
  332.  
  333. \hy-10{180}{wxHyperTextWindow::DisplayFileAt}
  334.  
  335. \hy-8{181}{void DisplayFileAt(long blockId, Bool refresh = TRUE)}
  336.  
  337. Positions the file at the given block, drawing the text only if \hy-7{182}{refresh} is TRUE.
  338. If \hy-7{183}{blockId} is -1, the file is displayed at the top.
  339.  
  340. \hy-10{185}{wxHyperTextWindow::DisplayFileAtTop}
  341.  
  342. \hy-8{186}{void DisplayFileAtTop(void)}
  343.  
  344. Displays the file at the top (first section).
  345.  
  346. \hy-10{188}{wxHyperTextWindow::DisplayNextSection}
  347.  
  348. \hy-8{189}{void DisplayNextSection(void)}
  349.  
  350. Finds and displays the next section.
  351.  
  352. \hy-10{191}{wxHyperTextWindow::DisplayPreviousSection}
  353.  
  354. \hy-8{192}{void DisplayPreviousSection(void)}
  355.  
  356. Finds and displays the previous section.
  357.  
  358. \hy-10{194}{wxHyperTextWindow::DrawOutline}
  359.  
  360. \hy-8{195}{void DrawOutline(float x1, float y1, float x2, float y2)}
  361.  
  362. Draws a rectangular outline for rubber-banding using the given
  363. top-left and bottom-right coordinates
  364.  
  365. \hy-10{197}{wxHyperTextWindow::FindBlock}
  366.  
  367. \hy-8{198}{wxTextChunk * FindBlock(long blockId)}
  368.  
  369. For a given block id, returns the text chunk at the start of the
  370. block.
  371.  
  372. \hy-10{200}{wxHyperTextWindow::FindBlockForSection}
  373.  
  374. \hy-8{201}{long FindBlockForSection(wxNode *sectionNode)}
  375.  
  376. Pointers to blocks which mark sections are stored in the data member
  377. \hy-8{202}{sections}. This function takes a node which is known to point
  378. to a text chunk marking a block, and returns the block id.
  379. This is a fairly trivial function since it just gets the \hy-8{203}{wxTextChunk}
  380. from the node and returns its \hy-8{204}{block_id}.
  381.  
  382. \hy-10{206}{wxHyperTextWindow::FindChunkAtBlock}
  383.  
  384. \hy-8{207}{wxNode * FindChunkAtBlock(long blockId)}
  385.  
  386. For a given block id, returns the position in the text chunks list of
  387. the first CHUNK_START_LINE chunk before the block.  A \hy-8{208}{wxNode}
  388. pointer is returned to allow the programmer to efficiently traverse
  389. the text chunks list from this point. The data stored in this node is
  390. a \hy-8{209}{wxTextChunk} object.
  391.  
  392. This function may not be very useful for programmers; it is mainly for
  393. internal use. Normally functions returning and taking block ids
  394. are used for manipulating blocks.
  395.  
  396. \hy-10{211}{wxHyperTextWindow::FindChunkAtLine}
  397.  
  398. \hy-8{212}{wxNode * FindChunkAtLine(long blockId)}
  399.  
  400. For a given block id, returns the position in the text chunks list of
  401. the first chunk on the given line.  A \hy-8{213}{wxNode} pointer is returned
  402. to allow the programmer to efficiently traverse the text chunks list
  403. from this point. The data stored in this node is a \hy-8{214}{wxTextChunk}
  404. object.
  405.  
  406. This function may not be very useful for programmers; it is mainly for
  407. internal use. Normally functions returning and taking block ids
  408. are used for manipulating blocks.
  409.  
  410. \hy-10{216}{wxHyperTextWindow::FindPosition}
  411.  
  412. \hy-8{217}{Bool FindPosition(float mouseX, float mouseY, int *charPos, int *linePos, long *blockId)}
  413.  
  414. Finds the character and line position of the given point, plus the id of the block found.
  415. Returns FALSE if no character was found at this position.
  416.  
  417. \hy-10{219}{wxHyperTextWindow::GenerateId}
  418.  
  419. \hy-8{220}{long GenerateId(void)}
  420.  
  421. Generates a unique identifier for a block; may be overridden to supply
  422. a different generator.
  423.  
  424. \hy-10{222}{wxHyperTextWindow::GetBlockText}
  425.  
  426. \hy-8{223}{void GetBlockText(char *buffer, int maxSize, long blockId)}
  427.  
  428. \hy-8{224}{void GetBlockText(char *buffer, int maxSize, wxNode *node, long blockId)}
  429.  
  430. Gets the plain text bounded by the given block, stripping out any
  431. block codes.  The second form is more efficient since it takes a node
  432. containing a pointer to the \hy-8{225}{wxTextChunk}, and doesn't have to
  433. search for the block.
  434.  
  435. \hy-10{227}{wxHyperTextWindow::GetBlockType}
  436.  
  437. \hy-8{228}{int GetBlockType(long blockId)}
  438.  
  439. Gets the type of the given block.
  440.  
  441. \hy-10{230}{wxHyperTextWindow::GetCurrentSectionNumber}
  442.  
  443. \hy-8{231}{int GetCurrentSectionNumber(void)}
  444.  
  445. Gets the number of the currently-displayed section, starting from 1. Zero is returned
  446. if there are no section markers.
  447.  
  448. \hy-10{233}{wxHyperTextWindow::GetEditMode}
  449.  
  450. \hy-8{234}{Bool GetEditMode(void)}
  451.  
  452. Returns TRUE if the hypertext window is editable.
  453.  
  454. \hy-10{236}{wxHyperTextWindow::GetFirstSelection}
  455.  
  456. \hy-8{237}{long GetFirstSelection(void)}
  457.  
  458. Gets the first block selected. Use \hy-8{238}{GetNextSelection} for subsequent
  459. blocks. Returns -1 if no more selections.
  460.  
  461. \hy-10{240}{wxHyperTextWindow::GetLinkTable}
  462.  
  463. \hy-8{241}{wxHashTable * GetLinkTable(void)}
  464.  
  465. Returns the hypertext window's hash table used for storing links
  466. between blocks. Objects of type \hy-8{242}{HypertextItem} are stored in the
  467. table, containing a destination filename and destination block id;
  468. these objects must be indexed by the source block id, to store a link
  469. between a source block and destination block.
  470.  
  471. This is only relevant if using the built-in index facility, rather than
  472. implementing your own index. You need to put and get explicitly, and writing
  473. to a file will use this table for saving the index. For example:
  474.  
  475. \hy-14{243}{  if (GetLinkTable()->Get(block_id))
  476.     MainFrame->SetStatusText("This block already linked!");
  477.   else if (hySelection->block_id > -1)
  478.   {
  479.     GetLinkTable()->Put(block_id,
  480.       new HypertextItem(hySelection->filename, hySelection->block_id));
  481.     modified = TRUE;
  482.     SelectBlock(hySelection->block_id, FALSE);
  483.     Compile();
  484.     DisplayFile();
  485.   }
  486. }
  487. \hy-10{245}{wxHyperTextWindow::GetNextSelection}
  488.  
  489. \hy-8{246}{long GetFirstSelection(void)}
  490.  
  491. Gets the next  block selected (use \hy-8{247}{GetFirstSelection} to start.
  492. Returns -1 if no more selections.
  493.  
  494. \hy-10{249}{wxHyperTextWindow::GetTitle}
  495.  
  496. \hy-8{250}{char * GetTitle(void)}
  497.  
  498. Returns NULL or the title (pointer to the hypertext window's local memory).
  499.  
  500.  
  501. \hy-10{252}{wxHyperTextWindow::LoadFile}
  502.  
  503. \hy-8{253}{Bool LoadFile(char *file)}
  504.  
  505. Loads the named file.
  506.  
  507. \hy-10{255}{wxHyperTextWindow::Modified}
  508.  
  509. \hy-8{256}{Bool Modified(void)}
  510.  
  511. Returns true if the user has modified the text.
  512.  
  513. \hy-10{258}{wxHyperTextWindow::OnBeginDragLeft}
  514.  
  515. \hy-8{259}{void OnBeginDragLeft(float x, float y, long blockId, int keys)}
  516.  
  517. Called when the user starts to left-drag. Overrideable.
  518.  
  519. \hy-10{261}{wxHyperTextWindow::OnBeginDragRight}
  520.  
  521. \hy-8{262}{void OnBeginDragRight(float x, float y, long blockId, int keys)}
  522.  
  523. Called when the user starts to right-drag. Overrideable.
  524.  
  525. \hy-10{264}{wxHyperTextWindow::OnDragLeft}
  526.  
  527. \hy-8{265}{void OnDragLeft(Bool draw, float x, float y, long blockId, int keys)}
  528.  
  529. Called when the user is in the middle of a drag operation; called once
  530. with \hy-7{266}{draw} equal to FALSE and with \hy-7{267}{x} and \hy-7{268}{y} equal to
  531. the old values, then again with \hy-7{269}{draw} equal to TRUE and updated
  532. \hy-7{270}{x} and \hy-7{271}{y} (to allow erase/draw operations).
  533.  
  534. \hy-10{273}{wxHyperTextWindow::OnDragRight}
  535.  
  536. \hy-8{274}{void OnDragRight(Bool draw, float x, float y, long blockId, int keys)}
  537.  
  538. Called when the user is in the middle of a drag operation; called once
  539. with \hy-7{275}{draw} equal to FALSE and with \hy-7{276}{x} and \hy-7{277}{y} equal to
  540. the old values, then again with \hy-7{278}{draw} equal to TRUE and updated
  541. \hy-7{279}{x} and \hy-7{280}{y} (to allow erase/draw operations).
  542.  
  543. \hy-10{282}{wxHyperTextWindow::OnEndDragLeft}
  544.  
  545. \hy-8{283}{void OnEndDragLeft(float x, float y, long blockId, int keys)}
  546.  
  547. Called when the user finishes left-dragging. Overrideable.
  548.  
  549. \hy-10{285}{wxHyperTextWindow::OnEndDragRight}
  550.  
  551. \hy-8{286}{void OnEndDragRight(float x, float y, long blockId, int keys)}
  552.  
  553. Called when the user finishes right-dragging. Overrideable.
  554.  
  555. \hy-10{288}{wxHyperTextWindow::OnLeftClick}
  556.  
  557. \hy-8{289}{void OnLeftClick(float x, float y, int charPos, int linePos, long blockId, int keys)}
  558.  
  559. Called when the user left-clicks. Overrideable. The default behaviour when SHIFT is held down
  560. is to select or deselect the mouse-over block.
  561.  
  562. \hy-10{291}{wxHyperTextWindow::OnRightClick}
  563.  
  564. \hy-8{292}{void OnRightClick(float x, float y, int charPos, int linePos, long blockId, int keys)}
  565.  
  566. Called when the user right-clicks. Overrideable.
  567.  
  568. \hy-10{294}{wxHyperTextWindow::OnSelectBlock}
  569.  
  570. \hy-8{295}{void OnSelectBlock(long blockId, Bool select)}
  571.  
  572. Called whenever a block is selected or deselected. Overridable.
  573.  
  574. \hy-10{297}{wxHyperTextWindow::RestoreSection}
  575.  
  576. \hy-8{298}{void RestoreSection(void)}
  577.  
  578. When a call is made to \hy-8{299}{Compile}, the current pointer to the current
  579. section becomes invalid, since all sections are recalculated. You need
  580. to \hy-8{300}{SaveSection} before \hy-8{301}{Compile}, followed by \hy-8{302}{RestoreSection} after
  581. the \hy-8{303}{Compile}, in order to restore the display to the previous state.
  582.  
  583. \hy-10{305}{wxHyperTextWindow::SaveFile}
  584.  
  585. \hy-8{306}{Bool SaveFile(char *file)}
  586.  
  587. Saves the hypertext file and index.
  588.  
  589. \hy-10{308}{wxHyperTextWindow::SaveSection}
  590.  
  591. \hy-8{309}{void SaveSection(void)}
  592.  
  593. When a call is made to \hy-8{310}{Compile}, the current pointer to the current
  594. section becomes invalid, since all sections are recalculated. You need
  595. to call this before \hy-8{311}{Compile}, followed by \hy-8{312}{RestoreSection} after
  596. the \hy-8{313}{Compile}, in order to restore the display to the previous state.
  597.  
  598. \hy-10{315}{wxHyperTextWindow::SelectBlock}
  599.  
  600. \hy-8{316}{void SelectBlock(wxTextChunk * block, Bool select = TRUE)}
  601.  
  602. \hy-8{317}{void SelectBlock(long blockId, Bool select = TRUE)}
  603.  
  604. If \hy-7{318}{select} is TRUE, select the existing block, marking it in cyan
  605. (colour screens) or in inverse video (monochrome screens).  If \hy-7{319}{
  606. select} is FALSE, deselect the block. The first form is more efficient
  607. since no search need be done for the block.
  608.  
  609. Note that \hy-8{320}{Compile} must be called before this call has any visible effect.
  610.  
  611. \hy-10{322}{wxHyperTextWindow::SetBlockType}
  612.  
  613. \hy-8{323}{void SetBlockType(long blockId, int blockType)}
  614.  
  615. Set the specified block to have the given type.
  616.  
  617. \hy-10{325}{wxHyperTextWindow::SetEditMode}
  618.  
  619. \hy-8{326}{void SetEditMode(Bool editable)}
  620.  
  621. Specifies whether the user should be able to mark up the text or not.
  622.  
  623. \hy-10{328}{wxHyperTextWindow::SetIndexWriting}
  624.  
  625. \hy-8{329}{void SetIndexWriting(Bool indexWriting)}
  626.  
  627. Specifies whether the built-in index and title should be written when
  628. \hy-8{330}{SaveFile} is called. The default is FALSE.
  629.  
  630. \hy-10{332}{wxHyperTextWindow::SetMapping}
  631.  
  632. \hy-8{333}{void SetMapping(wxHyperTextMapping *mapping)}
  633.  
  634. Specify the set of block mappings for this window; this must be called.
  635.  
  636. \hy-10{335}{wxHyperTextWindow::SetMargins}
  637.  
  638. \hy-8{336}{void SetMargins(int left, int top)}
  639.  
  640. Sets the margins to leave to the left and top of the canvas when
  641. displaying text.
  642.  
  643. \hy-10{338}{wxHyperTextWindow::SetTitle}
  644.  
  645. \hy-8{339}{void SetTitle(char *title)}
  646.  
  647. Sets the title of the hypertext window (allocates its own memory), to be written
  648. to the index file if index writing mode is on.
  649.  
  650.  
  651. \hy-10{350}{wxTextChunk::wxTextChunk}
  652.  
  653. \hy-8{351}{void wxTextChunk(int chunkType, int lineNumber, char *text, wxFont *font,
  654. wxColour *colour, int blockType, long blockId, int attribute, Bool visibility)}
  655.  
  656. Constructor. Used only internally.
  657.  
  658. \hy-10{353}{wxTextChunk::~wxTextChunk}
  659.  
  660. \hy-8{354}{void ~wxTextChunk(void)}
  661.  
  662. Destructor. Used only internally.
  663.  
  664. \hy-10{356}{wxTextChunk::background_colour}
  665.  
  666. \hy-8{357}{wxColour * background_colour}
  667.  
  668. The background colour allocated for the chunk by \hy-8{358}{Compile}.
  669.  
  670. \hy-10{360}{wxTextChunk::block_id}
  671.  
  672. \hy-8{361}{long block_id}
  673.  
  674. Id of the block associated with the text in the chunk.
  675.  
  676. \hy-10{363}{wxTextChunk::block_type}
  677.  
  678. \hy-8{364}{int block_type}
  679.  
  680. Block type, an integer defined by the application using a \hy-8{365}{wxHyperTextMapping}
  681. object.
  682.  
  683. \hy-10{367}{wxTextChunk::chunk_type}
  684.  
  685. \hy-8{368}{int chunk_type}
  686.  
  687. The \hy-8{369}{chunk_type} data member may be one of:
  688.  
  689.  
  690.  --  CHUNK_START_BLOCK
  691.  --  CHUNK_START_UNRECOGNIZED_BLOCK
  692.  --  CHUNK_END_BLOCK
  693.  --  CHUNK_START_BLOCK
  694.  
  695.  
  696. \hy-10{371}{wxTextChunk::colour}
  697.  
  698. \hy-8{372}{wxColour * colour}
  699.  
  700. The foreground colour allocated for the chunk by \hy-8{373}{Compile}.
  701.  
  702. \hy-10{375}{wxTextChunk::end_id}
  703.  
  704. \hy-8{376}{long end_id}
  705.  
  706. Id of the block which has just ended, if the type of this chunk is CHUNK_END_BLOCK.
  707. \hy-8{377}{block_id} is the id of block which has come into scope, and which starts with the
  708. text stored in the chunk.
  709.  
  710. \hy-10{379}{wxTextChunk::font}
  711.  
  712. \hy-8{380}{wxFont * font}
  713.  
  714. The font allocated for the chunk by \hy-8{381}{Compile}.
  715.  
  716. \hy-10{383}{wxTextChunk::line_no}
  717.  
  718. \hy-8{384}{int line_no}
  719.  
  720. The line number for this chunk.
  721.  
  722. \hy-10{386}{wxTextChunk::logical_op}
  723.  
  724. \hy-8{387}{int logical_op}
  725.  
  726. The logical operator for this chunk.
  727.  
  728. \hy-10{389}{wxTextChunk::selected}
  729.  
  730. \hy-8{390}{Bool selected}
  731.  
  732. For chunks which start a block, TRUE if the block is currently selected.
  733.  
  734. \hy-10{392}{wxTextChunk::special_attribute}
  735.  
  736. \hy-8{393}{int special_attribute}
  737.  
  738. For a block-starting chunk, specifies one or more special attributes ORed together.
  739. There is currently only one such attribute, wxHYPER_SECTION, which
  740. if present indicates that the block starts a new section.
  741.  
  742. \hy-10{395}{wxTextChunk::text}
  743.  
  744. \hy-8{396}{char * text}
  745.  
  746. The actual text in the chunk.
  747.  
  748. \hy-10{398}{wxTextChunk::visibility}
  749.  
  750. \hy-8{399}{Bool visibility}
  751. \hyindex{
  752. "wxWindows Help"
  753. 101 102
  754. 103 104
  755. 106 107
  756. 109 110
  757. 112 113
  758. 115 116
  759. 120 121
  760. 123 124
  761. 126 127
  762. 130 131
  763. 133 134
  764. 136 137
  765. 139 140
  766. 143 144
  767. 147 148
  768. 150 151
  769. 155 156
  770. 160 161
  771. 163 164
  772. 171 172
  773. 175 176
  774. 179 180
  775. 184 185
  776. 187 188
  777. 190 191
  778. 193 194
  779. 196 197
  780. 199 200
  781. 205 206
  782. 210 211
  783. 215 216
  784. 218 219
  785. 221 222
  786. 226 227
  787. 229 230
  788. 232 233
  789. 235 236
  790. 239 240
  791. 244 245
  792. 248 249
  793. 251 252
  794. 254 255
  795. 257 258
  796. 260 261
  797. 263 264
  798. 272 273
  799. 281 282
  800. 284 285
  801. 287 288
  802. 290 291
  803. 293 294
  804. 296 297
  805. 304 305
  806. 307 308
  807. 314 315
  808. 321 322
  809. 324 325
  810. 327 328
  811. 331 332
  812. 334 335
  813. 337 338
  814. 340 341
  815. 349 350
  816. 352 353
  817. 355 356
  818. 359 360
  819. 362 363
  820. 366 367
  821. 370 371
  822. 374 375
  823. 378 379
  824. 382 383
  825. 385 386
  826. 388 389
  827. 391 392
  828. 394 395
  829. 397 398
  830. }
  831.