| Class TLinkedListForm (unit SortLst) |
TForm
The next cell in the list.
| Constructors |
| Functions |
procedure CmdInsertClick(Sender: TObject);
procedure CmdRemoveAfterClick(Sender: TObject);
procedure DrawList;
procedure EnableButtons;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormPaint(Sender: TObject);
procedure ValueTextChange(Sender: TObject);| Properties |
| Events |
| Variables |
CmdInsert : TButton;
CmdRemoveAfter : TButton;
ValueText : TEdit;
bottom_sentinel : TCell;
num_items : Integer;
selected : Integer;
top_sentinel : TCell;| Constructors |
| Functions |
procedure CmdInsertClick(Sender: TObject);Add a new cell after the selected cell.
procedure CmdRemoveAfterClick(Sender: TObject);Remove the cell after the selected cell.
procedure DrawList;Display the list, highlighting the selected item.
procedure EnableButtons;Enable the appropriate buttons.
procedure FormCreate(Sender: TObject);Initialize the empty linked list.
procedure FormDestroy(Sender: TObject);Free all the linked list memory. This doesn't matter for this example program. It would be important if the program created and destroyed many forms.
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);Select the item clicked.
procedure FormPaint(Sender: TObject);Redraw the list.
procedure ValueTextChange(Sender: TObject);Enable the appropriate buttons.
| Properties |
| Events |
| Variables |
CmdInsert : TButton;
CmdRemoveAfter : TButton;
ValueText : TEdit;
bottom_sentinel : TCell;
num_items : Integer;
selected : Integer;
top_sentinel : TCell;Private declarations