Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

CHMListCtrl Class Reference

List control class meant to emulate the look and feel of a wxListBox. More...

#include <chmlistctrl.h>

Inheritance diagram for CHMListCtrl:

wxListCtrl List of all members.

Public Member Functions

 CHMListCtrl (wxWindow *parent, CHMHtmlWindow *html, wxWindowID id=-1)
 Initializes the custom list control.
 ~CHMListCtrl ()
 Cleanup.
void Reset ()
 Cleans up and removes all the list items.
void AddPairItem (const wxString &title, const wxString &url)
 Adds a title:url pair to the list. The title is the part that gets displayed, the url is tha page where the HTML window should go when the item is being clicked.
void LoadSelected ()
 Loads the page that corresponds to the item currently selected.
void UpdateUI ()
 Should be called each time the list control's state changes.
void FindBestMatch (const wxString &title)
 Finds the list item that is the best match.

Protected Member Functions

void OnSize (wxSizeEvent &event)
 Gets called when the widget is being resized.
wxString OnGetItemText (long item, long column) const
 Gets called when an item needs to be displayed.

Private Member Functions

void ResetItems ()
 Delete/empty the items in the item array.

Private Attributes

ItemPairArray _items
CHMHtmlWindow_html
int _currentSize

Detailed Description

List control class meant to emulate the look and feel of a wxListBox.


Constructor & Destructor Documentation

CHMListCtrl::CHMListCtrl wxWindow *  parent,
CHMHtmlWindow html,
wxWindowID  id = -1
 

Initializes the custom list control.

Parameters:
parent The parent widget.
html Pointer to a CHMHtmlWindow that I'll associate with this object so that selecting an item from the list will display the corresponding page in the HTML window.
id Widget id.


Member Function Documentation

void CHMListCtrl::AddPairItem const wxString &  title,
const wxString &  url
 

Adds a title:url pair to the list. The title is the part that gets displayed, the url is tha page where the HTML window should go when the item is being clicked.

Parameters:
title The title to add.
url The title's associated url.

void CHMListCtrl::FindBestMatch const wxString &  title  ) 
 

Finds the list item that is the best match.

Parameters:
title The string to match against.


The documentation for this class was generated from the following files:
Generated on Mon May 22 12:43:42 2006 for xCHM by  doxygen 1.4.4