Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

C_ListView Class Reference

Class used for the utilisation of List View control. More...

#include <C_ListView.h>


Public Types

enum  EHighlight { HIGHLIGHT_NORMAL, HIGHLIGHT_ALLCOLUMNS, HIGHLIGHT_ROW }
 Repaint wich are in collision. More...


Public Member Functions

 C_ListView (void)
 The Constructor.

 ~C_ListView (void)
 The Destructor.

bool Link (HWND ListView)
 Associate the class to the list view.

bool Create_Columns (int iCx, int iCol)
 Create a column.

void Set_Column_Text (int iCol, char *Text)
 Put text into a column header.

void Set_Item_Text (int i, int SubItem, char *Text)
 Set the text of an item, into a specified column.

void SetPosition (int x, int y, int cx, int cy)
 Set the position of the List View.

void Init_Columns (HWND hwnd)
 Create the columns.

void Clear (void)
 Clear the list.

int Create_Item (char *Text)
 Add an item into the Listview.

int Insert_Item (char *Text, int index)
 Add an item into the Listview.

void Delete_Item (int index)
 Delete an Item from the listview.

int GetSelectedCount (void)
 Number of Item Selectioned.

int GetSelectedItem (void)
 Return an index of a selected item.

void SelectItem (int index)
 Select the following item.

void DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct, int State)
void RepaintSelectedItems ()
void AddCollision (int index)
void UpdateList (void)
void ClearCollisionsList (void)
void RepaintItem (int index)
void GetFormatedSize (char *size, char *Buffer, int Count)
bool isCollision (int index)
 Say if the Item is currently in collision.


Data Fields

HBRUSH HighlightBkgBrush
 Background Color of a selected item.

COLORREF HighlightTextBrush
 Text Color of a selected item.

HBRUSH CollisionBkgBrush
 Background Color of an item in collision.

COLORREF CollisionTextBrush
 Text color of an item in collision.

int Collision_table [15]
 Stockage of the collisions row.

int m_nHighlight
 I don't know.

int Current_Item
 Used by GetSelectedItem().

HWND Lst
 Handle to the ListView.

long Nb_Column
 The number of created columns.


Detailed Description

Class used for the utilisation of List View control.

If you need to use the List View, use this class (modify it if you need)


Member Enumeration Documentation

enum C_ListView::EHighlight
 

Repaint wich are in collision.

You must add the collision with AddCollision, the item will be of CollisionBkgBrush and CollisionTextBrush color.

See also:
AddCollision
Enumeration values:
HIGHLIGHT_NORMAL 
HIGHLIGHT_ALLCOLUMNS 
HIGHLIGHT_ROW 


Constructor & Destructor Documentation

C_ListView::C_ListView void   ) 
 

The Constructor.

Set to 0, and Current_Item to -1

C_ListView::~C_ListView void   ) 
 

The Destructor.

do absolutely nothing


Member Function Documentation

void C_ListView::AddCollision int  index  ) 
 

void C_ListView::Clear void   ) 
 

Clear the list.

Delete all the item contained into the List View

void C_ListView::ClearCollisionsList void   ) 
 

bool C_ListView::Create_Columns int  iCx,
int  iCol
 

Create a column.

Create a column into the list view, you must create one before use Set_Column_Text

Parameters:
iCx width of the column
iCol Index of the column
See also:
Set_Column_Text()

Set_Item_Text()

int C_ListView::Create_Item char *  Text  ) 
 

Add an item into the Listview.

Parameters:
Text,text of the item (if there is few columns, it's the first left)
Param Index of the Item
Returns:
I don't know :/

void C_ListView::Delete_Item int  index  ) 
 

Delete an Item from the listview.

Parameters:
index Index of the item to delete

void C_ListView::DrawItem LPDRAWITEMSTRUCT  lpDrawItemStruct,
int  State
 

void C_ListView::GetFormatedSize char *  size,
char *  Buffer,
int  Count
 

int C_ListView::GetSelectedCount void   ) 
 

Number of Item Selectioned.

Returns:
the number of item wich are selected

int C_ListView::GetSelectedItem void   ) 
 

Return an index of a selected item.

Returns:
The index of the first selected item

void C_ListView::Init_Columns HWND  hwnd  ) 
 

Create the columns.

This members create the columns used for the display of a .ssa file

Parameters:
hwnd Handle to the parent window

int C_ListView::Insert_Item char *  Text,
int  index
 

Add an item into the Listview.

Parameters:
Text,text of the item (if there is few columns, it's the first left)
Param Index of the Item
Returns:
I don't know :/

bool C_ListView::isCollision int  index  ) 
 

Say if the Item is currently in collision.

You must the collision via AddCollision

Parameters:
index The index of the item in the listview
Returns:
true if the item is in collision, false otherwise
See also:
AddCollision

bool C_ListView::Link HWND  ListView  ) 
 

Associate the class to the list view.

You MUST use Link before use any other members of the class

Parameters:
@param hwnd handle to the List View

void C_ListView::RepaintItem int  index  ) 
 

void C_ListView::RepaintSelectedItems  ) 
 

void C_ListView::SelectItem int  index  ) 
 

Select the following item.

Select the item wich is placed just after the current selected

void C_ListView::Set_Column_Text int  iCol,
char *  Text
 

Put text into a column header.

Parameters:
iCol index of the column to modify
Text text to display into the column header

void C_ListView::Set_Item_Text int  i,
int  SubItem,
char *  Text
 

Set the text of an item, into a specified column.

Parameters:
i Index of the item
SubItem index of the columns (iCol) the text to be displayed

void C_ListView::SetPosition int  x,
int  y,
int  cx,
int  cy
 

Set the position of the List View.

Parameters:
x position horizontal of the left-upper corner of the control
y position vertical of the left-upper corner of the control
cx Width of the control
cy Eigth of the control

void C_ListView::UpdateList void   ) 
 


Field Documentation

int C_ListView::Collision_table[15]
 

Stockage of the collisions row.

HBRUSH C_ListView::CollisionBkgBrush
 

Background Color of an item in collision.

COLORREF C_ListView::CollisionTextBrush
 

Text color of an item in collision.

int C_ListView::Current_Item
 

Used by GetSelectedItem().

HBRUSH C_ListView::HighlightBkgBrush
 

Background Color of a selected item.

COLORREF C_ListView::HighlightTextBrush
 

Text Color of a selected item.

HWND C_ListView::Lst
 

Handle to the ListView.

int C_ListView::m_nHighlight
 

I don't know.

long C_ListView::Nb_Column
 

The number of created columns.


The documentation for this class was generated from the following files:
Generated on Thu Jul 3 15:19:54 2003 for Sub Station Beta by doxygen1.3