added class keyword to proc bodies for fpc 2.1.1

git-svn-id: trunk@9376 -
This commit is contained in:
vincents 2006-05-30 11:53:11 +00:00
parent 879176f679
commit 16143c1144
10 changed files with 183 additions and 185 deletions

View File

@ -53,7 +53,7 @@ implementation
{ TWinCEWSArrow }
procedure TWinCEWSArrow.SetType(const AArrow: TArrow; const AArrowType: TArrowType;
class procedure TWinCEWSArrow.SetType(const AArrow: TArrow; const AArrowType: TArrowType;
const AShadowType: TShadowType);
begin
// TODO: implement me!
@ -69,4 +69,4 @@ initialization
////////////////////////////////////////////////////
RegisterWSComponent(TArrow, TWinCEWSArrow);
////////////////////////////////////////////////////
end.
end.

View File

@ -317,7 +317,6 @@ var
DeleteObject(MonoBmp);
end;
end;
SetBkMode(hdcNewBitmap, TRANSPARENT);
SetTextColor(hdcNewBitmap, 0);
DrawState(hdcNewBitmap, 0, nil, LPARAM(ButtonCaption), 0, XDestText, YDestText, 0, 0, TextFlags);

View File

@ -54,13 +54,13 @@ type
implementation
function TWinCEWSCustomCheckListBox.GetChecked(const ACheckListBox: TCustomCheckListBox;
class function TWinCEWSCustomCheckListBox.GetChecked(const ACheckListBox: TCustomCheckListBox;
const AIndex: integer): boolean;
begin
Result := TWinCECheckListBoxStrings(ACheckListBox.Items).Checked[AIndex];
end;
function TWinCEWSCustomCheckListBox.GetStrings(const ACustomListBox: TCustomListBox): TStrings;
class function TWinCEWSCustomCheckListBox.GetStrings(const ACustomListBox: TCustomListBox): TStrings;
var
Handle: HWND;
begin
@ -69,7 +69,7 @@ begin
GetWindowInfo(Handle)^.List := Result;
end;
procedure TWinCEWSCustomCheckListBox.SetChecked(const ACheckListBox: TCustomCheckListBox;
class procedure TWinCEWSCustomCheckListBox.SetChecked(const ACheckListBox: TCustomCheckListBox;
const AIndex: integer; const AChecked: boolean);
var
SizeRect: Windows.RECT;

View File

@ -290,9 +290,8 @@ end;
{ TWinCEWSStatusBar }
function InitCommonControlsEx_(_para1:LPINITCOMMONCONTROLSEX):WINBOOL; external ComctlDLL name 'InitCommonControlsEx';
function TWinCEWSStatusBar.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSStatusBar.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -300,7 +299,7 @@ var
begin
init.dwSize := Sizeof(TINITCOMMONCONTROLSEX);
init.dwICC := ICC_BAR_CLASSES;
InitCommonControlsEx_(@init);
InitCommonControlsEx(@init);
// general initialization of Params
PrepareCreateWindow(AWinControl, Params);
@ -322,20 +321,20 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSStatusBar.PanelUpdate(const AStatusBar: TStatusBar; PanelIndex: integer);
class procedure TWinCEWSStatusBar.PanelUpdate(const AStatusBar: TStatusBar; PanelIndex: integer);
begin
UpdateStatusBarPanelWidths(AStatusBar);
UpdateStatusBarPanel(AStatusBar.Panels[PanelIndex]);
end;
procedure TWinCEWSStatusBar.SetBounds(const AWinControl: TWinControl;
class procedure TWinCEWSStatusBar.SetBounds(const AWinControl: TWinControl;
const ALeft, ATop, AWidth, AHeight: integer);
begin
// statusbars do their own resizing, post a size message to it's queue
Windows.PostMessage(AWinControl.Handle, WM_SIZE, 0, 0);
end;
procedure TWinCEWSStatusBar.GetPreferredSize(const AWinControl: TWinControl;
class procedure TWinCEWSStatusBar.GetPreferredSize(const AWinControl: TWinControl;
var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean);
var
R: TRect;
@ -347,7 +346,7 @@ begin
end;
end;
procedure TWinCEWSStatusBar.SetPanelText(const AStatusBar: TStatusBar; PanelIndex: integer);
class procedure TWinCEWSStatusBar.SetPanelText(const AStatusBar: TStatusBar; PanelIndex: integer);
var
tmpSimpleText : PWideChar;
begin
@ -361,13 +360,13 @@ begin
UpdateStatusBarPanel(AStatusBar.Panels[PanelIndex]);
end;
procedure TWinCEWSStatusBar.SetText(const AWinControl: TWinControl;
class procedure TWinCEWSStatusBar.SetText(const AWinControl: TWinControl;
const AText: string);
begin
// inhibit. StatusBars do not have a caption, simpletext is set by SetPanelText
end;
procedure TWinCEWSStatusBar.Update(const AStatusBar: TStatusBar);
class procedure TWinCEWSStatusBar.Update(const AStatusBar: TStatusBar);
var
PanelIndex: integer;
begin
@ -383,7 +382,7 @@ end;
{ TWinCEWSProgressBar }
function TWinCEWSProgressBar.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSProgressBar.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -391,7 +390,7 @@ var
begin
init.dwSize := Sizeof(TINITCOMMONCONTROLSEX);
init.dwICC := ICC_PROGRESS_CLASS;
InitCommonControlsEx_(@init);
InitCommonControlsEx(@init);
// general initialization of Params
PrepareCreateWindow(AWinControl, Params);
// customization of Params
@ -411,7 +410,7 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSProgressBar.ApplyChanges(
class procedure TWinCEWSProgressBar.ApplyChanges(
const AProgressBar: TCustomProgressBar);
begin
with AProgressBar do
@ -437,7 +436,7 @@ begin
end;
end;
procedure TWinCEWSProgressBar.SetPosition(
class procedure TWinCEWSProgressBar.SetPosition(
const AProgressBar: TCustomProgressBar; const NewPosition: integer);
begin
Windows.SendMessage(AProgressBar.Handle, PBM_SETPOS, Windows.WPARAM(NewPosition), 0);
@ -446,7 +445,7 @@ end;
{ TWinCEWSToolbar}
{$IFDEF OldToolbar}
function TWinCEWSToolBar.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSToolBar.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -454,7 +453,7 @@ var
begin
init.dwSize := Sizeof(TINITCOMMONCONTROLSEX);
init.dwICC := ICC_BAR_CLASSES;
InitCommonControlsEx_(@init);
InitCommonControlsEx(@init);
// general initialization of Params
PrepareCreateWindow(AWinControl, Params);
// customization of Params
@ -469,12 +468,12 @@ begin
Result := Params.Window;
end;
function TWinCEWSToolbar.GetButtonCount(const AToolBar: TToolBar): integer;
class function TWinCEWSToolbar.GetButtonCount(const AToolBar: TToolBar): integer;
begin
Result := SendMessage(AToolbar.Handle, TB_BUTTONCOUNT, 0, 0)
end;
procedure TWinCEWSToolbar.InsertToolButton(const AToolBar: TToolbar; const AControl: TControl);
class procedure TWinCEWSToolbar.InsertToolButton(const AToolBar: TToolbar; const AControl: TControl);
var
PStr, PStr2: PWideChar;
Num: Integer;
@ -514,7 +513,7 @@ begin
Assert(False, 'Trace:!!!!!!!!!!!!!!!!!!!!!!!!!');
end;
procedure TWinCEWSToolbar.DeleteToolButton(const AToolBar: TToolbar; const AControl: TControl);
class procedure TWinCEWSToolbar.DeleteToolButton(const AToolBar: TToolbar; const AControl: TControl);
begin
// TODO: code buggy, Index of button to delete ?!
SendMessage(AToolBar.Handle, TB_DELETEBUTTON, 0, 0);
@ -523,7 +522,7 @@ end;
{ TWinCEWSTrackBar }
function TWinCEWSTrackBar.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSTrackBar.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -531,7 +530,7 @@ var
begin
init.dwSize := Sizeof(TINITCOMMONCONTROLSEX);
init.dwICC := ICC_BAR_CLASSES;
InitCommonControlsEx_(@init);
InitCommonControlsEx(@init);
// general initialization of Params
PrepareCreateWindow(AWinControl, Params);
// customization of Params
@ -545,7 +544,7 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSTrackBar.ApplyChanges(const ATrackBar: TCustomTrackBar);
class procedure TWinCEWSTrackBar.ApplyChanges(const ATrackBar: TCustomTrackBar);
var
wHandle: HWND;
NewStyle: integer;
@ -574,12 +573,12 @@ begin
end;
end;
function TWinCEWSTrackBar.GetPosition(const ATrackBar: TCustomTrackBar): integer;
class function TWinCEWSTrackBar.GetPosition(const ATrackBar: TCustomTrackBar): integer;
begin
Result := SendMessage(ATrackBar.Handle, TBM_GETPOS, 0, 0)
end;
procedure TWinCEWSTrackBar.SetPosition(const ATrackBar: TCustomTrackBar; const NewPosition: integer);
class procedure TWinCEWSTrackBar.SetPosition(const ATrackBar: TCustomTrackBar; const NewPosition: integer);
begin
Windows.SendMessage(ATrackBar.Handle, TBM_SETPOS, Windows.WPARAM(true), Windows.LPARAM(NewPosition));
end;

View File

@ -299,7 +299,7 @@ end;
{ TWinCEWSWinControl }
function TWinCEWSWinControl.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSWinControl.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -321,7 +321,7 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSWinControl.AddControl(const AControl: TControl);
class procedure TWinCEWSWinControl.AddControl(const AControl: TControl);
var
ParentPanelHandle, ParentHandle, ChildHandle: HWND;
begin
@ -346,18 +346,18 @@ begin
SetParent(ChildHandle, ParentHandle);
end;
function TWinCEWSWinControl.GetText(const AWinControl: TWinControl; var AText: String): Boolean;
class function TWinCEWSWinControl.GetText(const AWinControl: TWinControl; var AText: String): Boolean;
begin
AText := '';
Result := false;
end;
procedure TWinCEWSWinControl.SetBorderStyle(const AWinControl: TWinControl; const ABorderStyle: TBorderStyle);
class procedure TWinCEWSWinControl.SetBorderStyle(const AWinControl: TWinControl; const ABorderStyle: TBorderStyle);
begin
RecreateWnd(AWinControl);
end;
procedure TWinCEWSWinControl.SetChildZPosition(
class procedure TWinCEWSWinControl.SetChildZPosition(
const AWinControl, AChild: TWinControl; const AOldPos, ANewPos: Integer;
const AChildren: TFPList);
var
@ -410,7 +410,7 @@ end;
Resize a window
------------------------------------------------------------------------------}
procedure TWinCEWSWinControl.SetBounds(const AWinControl: TWinControl;
class procedure TWinCEWSWinControl.SetBounds(const AWinControl: TWinControl;
const ALeft, ATop, AWidth, AHeight: Integer);
var
IntfLeft, IntfTop, IntfWidth, IntfHeight: integer;
@ -432,17 +432,17 @@ begin
LCLControlSizeNeedsUpdate(AWinControl, false);
end;
procedure TWinCEWSWinControl.SetColor(const AWinControl: TWinControl);
class procedure TWinCEWSWinControl.SetColor(const AWinControl: TWinControl);
begin
// TODO: to be implemented, had no implementation in LM_SETCOLOR message
end;
procedure TWinCEWSWinControl.SetFont(const AWinControl: TWinControl; const AFont: TFont);
class procedure TWinCEWSWinControl.SetFont(const AWinControl: TWinControl; const AFont: TFont);
begin
Windows.SendMessage(AWinControl.Handle, WM_SETFONT, Windows.WParam(AFont.Handle), 1);
end;
procedure TWinCEWSWinControl.SetText(const AWinControl: TWinControl; const AText: string);
class procedure TWinCEWSWinControl.SetText(const AWinControl: TWinControl; const AText: string);
var
tmpStr : PWideChar;
begin
@ -453,12 +453,12 @@ begin
DisposePWideChar(tmpStr);
end;
procedure TWinCEWSWinControl.ConstraintsChange(const AWinControl: TWinControl);
class procedure TWinCEWSWinControl.ConstraintsChange(const AWinControl: TWinControl);
begin
// TODO: implement me!
end;
procedure TWinCEWSWinControl.DestroyHandle(const AWinControl: TWinControl);
class procedure TWinCEWSWinControl.DestroyHandle(const AWinControl: TWinControl);
var
Handle: HWND;
AccelTable: HACCEL;
@ -470,13 +470,13 @@ begin
DestroyWindow(Handle);
end;
procedure TWinCEWSWinControl.Invalidate(const AWinControl: TWinControl);
class procedure TWinCEWSWinControl.Invalidate(const AWinControl: TWinControl);
begin
// lpRect = nil updates entire client area of window
InvalidateRect(AWinControl.Handle, nil, true);
end;
procedure TWinCEWSWinControl.ShowHide(const AWinControl: TWinControl);
class procedure TWinCEWSWinControl.ShowHide(const AWinControl: TWinControl);
begin
// other methods also use ShowHide, can't move code
TWinCEWidgetSet(WidgetSet).ShowHide(AWinControl);
@ -495,4 +495,4 @@ initialization
// RegisterWSComponent(TCustomControl, TWSCustomControl);
// RegisterWSComponent(TImageList, TWSImageList);
////////////////////////////////////////////////////
end.
end.

View File

@ -62,7 +62,7 @@ type
// Column code
////////////////////////////////////////////////////////////////////////////////
procedure TWinCEWSCustomListView.ColumnDelete(const ALV: TCustomListView; const AIndex: Integer);
class procedure TWinCEWSCustomListView.ColumnDelete(const ALV: TCustomListView; const AIndex: Integer);
var
hHdr, hLV: THandle;
Count: Integer;
@ -82,7 +82,7 @@ begin
ListView_DeleteColumn(hLV, Count - 1);
end;
function TWinCEWSCustomListView.ColumnGetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn): Integer;
class function TWinCEWSCustomListView.ColumnGetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn): Integer;
var
lvc: TLvColumn;
begin
@ -101,7 +101,7 @@ begin
then Result := lvc.cx;
end;
procedure TWinCEWSCustomListView.ColumnInsert(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn);
class procedure TWinCEWSCustomListView.ColumnInsert(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn);
var
lvc: TLvColumn;
tmpCaption :PWideChar;
@ -116,7 +116,7 @@ begin
DisposePWideChar(lvc.pszText);
end;
procedure TWinCEWSCustomListView.ColumnMove(const ALV: TCustomListView; const AOldIndex, ANewIndex: Integer; const AColumn: TListColumn);
class procedure TWinCEWSCustomListView.ColumnMove(const ALV: TCustomListView; const AOldIndex, ANewIndex: Integer; const AColumn: TListColumn);
var
lvc, oldlvc: TLvColumn_v4_7;
buf, oldbuf: array[0..1024] of WideChar;
@ -157,7 +157,7 @@ begin
ListView_SetColumn(ALV.Handle, ANewIndex, oldlvc.lvc);
end;
procedure TWinCEWSCustomListView.ColumnSetAlignment(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAlignment: TAlignment);
class procedure TWinCEWSCustomListView.ColumnSetAlignment(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAlignment: TAlignment);
const
JUSTIFICATION: array[TAlignment] of Integer = (
LVCFMT_LEFT,
@ -176,7 +176,7 @@ begin
ListView_SetColumn(ALV.Handle, AIndex, lvc);
end;
procedure TWinCEWSCustomListView.ColumnSetAutoSize(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAutoSize: Boolean);
class procedure TWinCEWSCustomListView.ColumnSetAutoSize(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AAutoSize: Boolean);
begin
if not WSCheckHandleAllocated(ALV, 'ColumnSetAutoSize')
then Exit;
@ -186,7 +186,7 @@ begin
else ListView_SetColumnWidth(ALV.Handle, AIndex, AColumn.Width);
end;
procedure TWinCEWSCustomListView.ColumnSetCaption(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const ACaption: String);
class procedure TWinCEWSCustomListView.ColumnSetCaption(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const ACaption: String);
var
lvc: TLvColumn;
tmpACaption : PWideChar;
@ -201,7 +201,7 @@ begin
DisposePWideChar(lvc.pszText);
end;
procedure TWinCEWSCustomListView.ColumnSetImage(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AImageIndex: Integer);
class procedure TWinCEWSCustomListView.ColumnSetImage(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AImageIndex: Integer);
var
lvc: TLvColumn_v4_7;
begin
@ -228,7 +228,7 @@ begin
ListView_SetColumn(ALV.Handle, AIndex, lvc.lvc);
end;
procedure TWinCEWSCustomListView.ColumnSetMaxWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMaxWidth: Integer);
class procedure TWinCEWSCustomListView.ColumnSetMaxWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMaxWidth: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'ColumnSetMaxWidth')
then Exit;
@ -236,7 +236,7 @@ begin
// TODO: in messageHandler
end;
procedure TWinCEWSCustomListView.ColumnSetMinWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMinWidth: integer);
class procedure TWinCEWSCustomListView.ColumnSetMinWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AMinWidth: integer);
begin
if not WSCheckHandleAllocated(ALV, 'ColumnSetMinWidth')
then Exit;
@ -244,7 +244,7 @@ begin
// TODO: in messageHandler
end;
procedure TWinCEWSCustomListView.ColumnSetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AWidth: Integer);
class procedure TWinCEWSCustomListView.ColumnSetWidth(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AWidth: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'ColumnSetWidth')
then Exit;
@ -252,7 +252,7 @@ begin
ListView_SetColumnWidth(ALV.Handle, AIndex, AWidth)
end;
procedure TWinCEWSCustomListView.ColumnSetVisible(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AVisible: Boolean);
class procedure TWinCEWSCustomListView.ColumnSetVisible(const ALV: TCustomListView; const AIndex: Integer; const AColumn: TListColumn; const AVisible: Boolean);
begin
if not WSCheckHandleAllocated(ALV, 'ColumnSetVisible')
then Exit;
@ -268,7 +268,7 @@ end;
// Item code
////////////////////////////////////////////////////////////////////////////////
procedure TWinCEWSCustomListView.ItemDelete(const ALV: TCustomListView; const AIndex: Integer);
class procedure TWinCEWSCustomListView.ItemDelete(const ALV: TCustomListView; const AIndex: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'ItemDelete')
then Exit;
@ -276,7 +276,7 @@ begin
ListView_DeleteItem(ALV.Handle, AIndex);
end;
function TWinCEWSCustomListView.ItemGetState(const ALV: TCustomListView;
class function TWinCEWSCustomListView.ItemGetState(const ALV: TCustomListView;
const AIndex: Integer; const AItem: TListItem; const AState: TListItemState;
out AIsSet: Boolean): Boolean;
const
@ -292,7 +292,7 @@ begin
Result := True;
end;
procedure TWinCEWSCustomListView.ItemInsert(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem);
class procedure TWinCEWSCustomListView.ItemInsert(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem);
var
lvi: TLvItem;
begin
@ -308,7 +308,7 @@ begin
DisposePWideChar(lvi.pszText);
end;
procedure TWinCEWSCustomListView.ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex, AImageIndex: Integer);
class procedure TWinCEWSCustomListView.ItemSetImage(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex, AImageIndex: Integer);
var
lvi: TLvItem;
begin
@ -323,7 +323,7 @@ begin
ListView_SetItem(ALV.Handle, lvi);
end;
procedure TWinCEWSCustomListView.ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AState: TListItemState; const AIsSet: Boolean);
class procedure TWinCEWSCustomListView.ItemSetState(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const AState: TListItemState; const AIsSet: Boolean);
const
// lisCut, lisDropTarget, lisFocused, lisSelected
FLAGS: array[TListItemState] of Integer = (LVIS_CUT, LVIS_DROPHILITED, LVIS_FOCUSED, LVIS_SELECTED);
@ -338,7 +338,7 @@ begin
else ListView_SetItemState(ALV.Handle, AIndex, 0, FLAGS[AState]);
end;
procedure TWinCEWSCustomListView.ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex: Integer; const AText: String);
class procedure TWinCEWSCustomListView.ItemSetText(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const ASubIndex: Integer; const AText: String);
var
tmpAText : PWideChar;
begin
@ -350,7 +350,7 @@ begin
DisposePWideChar(tmpAText);
end;
procedure TWinCEWSCustomListView.ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean);
class procedure TWinCEWSCustomListView.ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean);
begin
if not WSCheckHandleAllocated(ALV, 'ItemShow')
then Exit;
@ -363,7 +363,7 @@ end;
////////////////////////////////////////////////////////////////////////////////
function TWinCEWSCustomListView.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomListView.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
const
LISTVIEWSTYLES: array[TViewStyle] of DWORD = (LVS_ICON, LVS_SMALLICON, LVS_LIST, LVS_REPORT);
@ -385,7 +385,7 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSCustomListView.BeginUpdate(const ALV: TCustomListView);
class procedure TWinCEWSCustomListView.BeginUpdate(const ALV: TCustomListView);
begin
if not WSCheckHandleAllocated(ALV, 'BeginUpdate')
then Exit;
@ -393,7 +393,7 @@ begin
inherited BeginUpdate(ALV);
end;
procedure TWinCEWSCustomListView.EndUpdate(const ALV: TCustomListView);
class procedure TWinCEWSCustomListView.EndUpdate(const ALV: TCustomListView);
begin
if not WSCheckHandleAllocated(ALV, 'EndUpdate')
then Exit;
@ -401,7 +401,7 @@ begin
inherited EndUpdate(ALV);
end;
function TWinCEWSCustomListView.GetBoundingRect(const ALV: TCustomListView): TRect;
class function TWinCEWSCustomListView.GetBoundingRect(const ALV: TCustomListView): TRect;
begin
if not WSCheckHandleAllocated(ALV, 'GetBoundingRect')
then Exit;
@ -409,7 +409,7 @@ begin
ListView_GetViewRect(ALV.Handle, Result);
end;
function TWinCEWSCustomListView.GetDropTarget(const ALV: TCustomListView): Integer;
class function TWinCEWSCustomListView.GetDropTarget(const ALV: TCustomListView): Integer;
begin
if not WSCheckHandleAllocated(ALV, 'GetDropTarget')
then Exit;
@ -417,7 +417,7 @@ begin
Result := ListView_GetNextItem(ALV.Handle, -1, LVNI_ALL or LVNI_DROPHILITED);
end;
function TWinCEWSCustomListView.GetFocused(const ALV: TCustomListView): Integer;
class function TWinCEWSCustomListView.GetFocused(const ALV: TCustomListView): Integer;
begin
if not WSCheckHandleAllocated(ALV, 'GetFocused')
then Exit;
@ -425,7 +425,7 @@ begin
Result := ListView_GetNextItem(ALV.Handle, -1, LVNI_ALL or LVNI_FOCUSED);
end;
function TWinCEWSCustomListView.GetHoverTime(const ALV: TCustomListView): Integer;
class function TWinCEWSCustomListView.GetHoverTime(const ALV: TCustomListView): Integer;
begin
if not WSCheckHandleAllocated(ALV, 'GetHoverTime')
then Exit;
@ -434,7 +434,7 @@ begin
// Result := ListView_GetHoverTime(ALV.Handle);
end;
function TWinCEWSCustomListView.GetSelCount(const ALV: TCustomListView): Integer;
class function TWinCEWSCustomListView.GetSelCount(const ALV: TCustomListView): Integer;
begin
if not WSCheckHandleAllocated(ALV, 'GetSelCount')
then Exit;
@ -442,7 +442,7 @@ begin
Result := ListView_GetSelectedCount(ALV.Handle);
end;
function TWinCEWSCustomListView.GetSelection(const ALV: TCustomListView): Integer;
class function TWinCEWSCustomListView.GetSelection(const ALV: TCustomListView): Integer;
begin
if not WSCheckHandleAllocated(ALV, 'GetSelection')
then Exit;
@ -450,7 +450,7 @@ begin
Result := ListView_GetNextItem(ALV.Handle, -1, LVNI_ALL or LVNI_SELECTED);
end;
function TWinCEWSCustomListView.GetTopItem(const ALV: TCustomListView): Integer;
class function TWinCEWSCustomListView.GetTopItem(const ALV: TCustomListView): Integer;
begin
if not WSCheckHandleAllocated(ALV, 'GetTopItem')
then Exit;
@ -463,7 +463,7 @@ begin
end;
end;
function TWinCEWSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
class function TWinCEWSCustomListView.GetVisibleRowCount(const ALV: TCustomListView): Integer;
begin
if not WSCheckHandleAllocated(ALV, 'GetVisibleRowCount')
then Exit;
@ -476,7 +476,7 @@ begin
end;
end;
function TWinCEWSCustomListView.GetHeader(const AHandle: THandle): THandle;
class function TWinCEWSCustomListView.GetHeader(const AHandle: THandle): THandle;
begin
//roozbeh not supported!
// Result := ListView_GetHeader(AHandle);
@ -494,7 +494,7 @@ end;
view is changed, or a WM_SYSPARAMETERCHANGE message is received.
********************************************************************)
procedure TWinCEWSCustomListView.PositionHeader(const AHandle: THandle);
class procedure TWinCEWSCustomListView.PositionHeader(const AHandle: THandle);
var
hwndHeader: HWND;
dwStyle: DWORD;
@ -527,7 +527,7 @@ begin
ListView_EnsureVisible(AHandle, 0, 0);
end;
procedure TWinCEWSCustomListView.SetAllocBy(const ALV: TCustomListView; const AValue: Integer);
class procedure TWinCEWSCustomListView.SetAllocBy(const ALV: TCustomListView; const AValue: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'SetAllocBy')
then Exit;
@ -535,7 +535,7 @@ begin
ListView_SetItemCount(ALV.Handle, AValue);
end;
procedure TWinCEWSCustomListView.SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer);
class procedure TWinCEWSCustomListView.SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'SetDefaultItemHeight')
then Exit;
@ -544,7 +544,7 @@ begin
end;
//roozbeh not supported!
procedure TWinCEWSCustomListView.SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles);
class procedure TWinCEWSCustomListView.SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles);
const
MASK = LVS_EX_ONECLICKACTIVATE {or LVS_EX_TWOCLICKACTIVATE or LVS_EX_UNDERLINEHOT or LVS_EX_UNDERLINECOLD};
var
@ -569,7 +569,7 @@ begin
end;
//roozbeh : not supported!
procedure TWinCEWSCustomListView.SetHoverTime(const ALV: TCustomListView; const AValue: Integer);
class procedure TWinCEWSCustomListView.SetHoverTime(const ALV: TCustomListView; const AValue: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'SetHoverTime')
then Exit;
@ -577,7 +577,7 @@ begin
// ListView_SetHoverTime(ALV.Handle, AValue);
end;
procedure TWinCEWSCustomListView.SetImageList(const ALV: TCustomListView; const AList: TListViewImageList; const AValue: TCustomImageList);
class procedure TWinCEWSCustomListView.SetImageList(const ALV: TCustomListView; const AList: TListViewImageList; const AValue: TCustomImageList);
begin
if not WSCheckHandleAllocated(ALV, 'SetImageList')
then Exit;
@ -585,7 +585,7 @@ begin
//TODO: implement imagelist
end;
procedure TWinCEWSCustomListView.SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean);
class procedure TWinCEWSCustomListView.SetProperty(const ALV: TCustomListView; const AProp: TListViewProperty; const AIsSet: Boolean);
begin
if not WSCheckHandleAllocated(ALV, 'SetProperty')
then Exit;
@ -609,7 +609,7 @@ begin
end;
end;
procedure TWinCEWSCustomListView.SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties);
class procedure TWinCEWSCustomListView.SetProperties(const ALV: TCustomListView; const AProps: TListViewProperties);
var
Prop: TListViewProperty;
Style, ExStyle, Mask, ExMask: Integer;
@ -649,7 +649,7 @@ begin
then UpdateExStyle(ALV.Handle, ExMask, ExStyle);
end;
procedure TWinCEWSCustomListView.SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle);
class procedure TWinCEWSCustomListView.SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle);
begin
if not WSCheckHandleAllocated(ALV, 'SetScrollBars')
then Exit;
@ -660,7 +660,7 @@ begin
else UpdateStyle(ALV.Handle, LVS_NOSCROLL, 0);
end;
procedure TWinCEWSCustomListView.SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer);
class procedure TWinCEWSCustomListView.SetScrolledLeft(const ALV: TCustomListView; const AValue: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'SetScrolledLeft')
then Exit;
@ -668,7 +668,7 @@ begin
ListView_Scroll(ALV.Handle, AValue, 0);
end;
procedure TWinCEWSCustomListView.SetScrolledTop(const ALV: TCustomListView; const AValue: Integer);
class procedure TWinCEWSCustomListView.SetScrolledTop(const ALV: TCustomListView; const AValue: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'SetScrolledTop')
then Exit;
@ -676,7 +676,7 @@ begin
ListView_Scroll(ALV.Handle, 0, AValue);
end;
procedure TWinCEWSCustomListView.SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer);
class procedure TWinCEWSCustomListView.SetSort(const ALV: TCustomListView; const AType: TSortType; const AColumn: Integer);
begin
if not WSCheckHandleAllocated(ALV, 'SetSort')
then Exit;
@ -684,7 +684,7 @@ begin
// TODO: implement
end;
procedure TWinCEWSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
class procedure TWinCEWSCustomListView.SetViewStyle(const ALV: TCustomListView; const Avalue: TViewStyle);
const
//vsIcon, vsSmallIcon, vsList, vsReport
STYLES: array[TViewStyle] of DWORD = (LVS_ICON, LVS_SMALLICON, LVS_LIST, LVS_REPORT);
@ -696,7 +696,7 @@ begin
UpdateStyle(ALV.Handle, 0, STYLES[AValue]);//roozbeh ?!
end;
procedure TWinCEWSCustomListView.UpdateStyle(const AHandle: THandle; const AMask, AStyle: Integer);
class procedure TWinCEWSCustomListView.UpdateStyle(const AHandle: THandle; const AMask, AStyle: Integer);
var
OldStyle, NewStyle: Integer;
begin
@ -719,7 +719,7 @@ begin
Windows.InvalidateRect(AHandle, nil, true);
end;
procedure TWinCEWSCustomListView.UpdateExStyle(const AHandle: THandle; const AMask, AStyle: Integer);
class procedure TWinCEWSCustomListView.UpdateExStyle(const AHandle: THandle; const AMask, AStyle: Integer);
var
OldStyle, NewStyle: Integer;
begin

View File

@ -273,7 +273,7 @@ end;
{ TWinCEWSCustomPage }
function TWinCEWSCustomPage.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomPage.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -299,7 +299,7 @@ begin
end;
end;
procedure TWinCEWSCustomPage.SetText(const AWinControl: TWinControl; const AText: string);
class procedure TWinCEWSCustomPage.SetText(const AWinControl: TWinControl; const AText: string);
var
TCI: TC_ITEM;
PageIndex: integer;
@ -326,14 +326,14 @@ begin
*)
end;
procedure TWinCEWSCustomPage.UpdateProperties(const ACustomPage: TCustomPage);
class procedure TWinCEWSCustomPage.UpdateProperties(const ACustomPage: TCustomPage);
begin
// TODO: implement me!
end;
{ TWinCEWSCustomNotebook }
function TWinCEWSCustomNotebook.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomNotebook.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -353,7 +353,7 @@ begin
Params.WindowInfo^.hasTabParent := false;
end;
procedure TWinCEWSCustomNotebook.AddPage(const ANotebook: TCustomNotebook;
class procedure TWinCEWSCustomNotebook.AddPage(const ANotebook: TCustomNotebook;
const AChild: TCustomPage; const AIndex: integer);
var
TCI: TC_ITEM;
@ -372,14 +372,14 @@ begin
end;*)
end;
procedure TWinCEWSCustomNotebook.MovePage(const ANotebook: TCustomNotebook;
class procedure TWinCEWSCustomNotebook.MovePage(const ANotebook: TCustomNotebook;
const AChild: TCustomPage; const NewIndex: integer);
begin
{ RemovePage(ANotebook, AChild.PageIndex);
AddPage(ANotebook,AChild,NewIndex);}
end;
procedure TWinCEWSCustomNotebook.RemovePage(const ANotebook: TCustomNotebook;
class procedure TWinCEWSCustomNotebook.RemovePage(const ANotebook: TCustomNotebook;
const AIndex: integer);
begin
// Windows.SendMessage(ANotebook.Handle, TCM_DELETEITEM, Windows.WPARAM(AIndex), 0);
@ -392,7 +392,7 @@ end;
Adds all pages to notebook (showtabs becomes true)
------------------------------------------------------------------------------}
procedure TWinCEWSCustomNotebook.AddAllNBPages(const ANotebook: TCustomNotebook);
class procedure TWinCEWSCustomNotebook.AddAllNBPages(const ANotebook: TCustomNotebook);
var
TCI: TC_ITEM;
I, Res: Integer;
@ -417,7 +417,7 @@ begin
AdjustSizeNotebookPages(ANotebook);}
end;
procedure TWinCEWSCustomNotebook.AdjustSizeNotebookPages(const ANotebook: TCustomNotebook);
class procedure TWinCEWSCustomNotebook.AdjustSizeNotebookPages(const ANotebook: TCustomNotebook);
var
I: Integer;
R: TRect;
@ -445,7 +445,7 @@ end;
Removes all pages from a notebook control (showtabs becomes false)
------------------------------------------------------------------------------}
procedure TWinCEWSCustomNotebook.RemoveAllNBPages(const ANotebook: TCustomNotebook);
class procedure TWinCEWSCustomNotebook.RemoveAllNBPages(const ANotebook: TCustomNotebook);
var
I: Integer;
WinHandle: HWND;
@ -456,7 +456,7 @@ begin
AdjustSizeNotebookPages(ANotebook);}
end;
function TWinCEWSCustomNotebook.GetPageRealIndex(const ANotebook: TCustomNotebook; AIndex: Integer): Integer;
class function TWinCEWSCustomNotebook.GetPageRealIndex(const ANotebook: TCustomNotebook; AIndex: Integer): Integer;
var
X: Integer;
begin
@ -482,7 +482,7 @@ begin
DeliverMessage(ANotebook, Mess);}
end;
function TWinCEWSCustomNotebook.GetTabIndexAtPos(const ANotebook: TCustomNotebook;
class function TWinCEWSCustomNotebook.GetTabIndexAtPos(const ANotebook: TCustomNotebook;
const AClientPos: TPoint): integer;
var
hittestInfo: TC_HITTESTINFO;
@ -492,7 +492,7 @@ begin
Result := Windows.SendMessage(ANotebook.Handle, TCM_HITTEST, 0, LPARAM(@hittestInfo));}
end;
procedure TWinCEWSCustomNotebook.SetPageIndex(const ANotebook: TCustomNotebook; const AIndex: integer);
class procedure TWinCEWSCustomNotebook.SetPageIndex(const ANotebook: TCustomNotebook; const AIndex: integer);
var
Handle: HWND;
PageHandle: HWND;
@ -519,7 +519,7 @@ begin
end;}
end;
procedure TWinCEWSCustomNotebook.SetTabPosition(const ANotebook: TCustomNotebook; const ATabPosition: TTabPosition);
class procedure TWinCEWSCustomNotebook.SetTabPosition(const ANotebook: TCustomNotebook; const ATabPosition: TTabPosition);
var
NotebookHandle: HWND;
WindowStyle: dword;
@ -539,7 +539,7 @@ begin
Windows.SetWindowLong(NotebookHandle, GWL_STYLE, WindowStyle);}
end;
procedure TWinCEWSCustomNotebook.ShowTabs(const ANotebook: TCustomNotebook; AShowTabs: boolean);
class procedure TWinCEWSCustomNotebook.ShowTabs(const ANotebook: TCustomNotebook; AShowTabs: boolean);
begin
{ if AShowTabs then
begin
@ -551,7 +551,7 @@ end;
{ TWinCEWSCustomPanel }
function TWinCEWSCustomPanel.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomPanel.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -573,7 +573,7 @@ end;
{ TWinCEWSCustomSplitter }
procedure TWinCEWSCustomSplitter.DrawSplitter(const ASplitter: TCustomSplitter
class procedure TWinCEWSCustomSplitter.DrawSplitter(const ASplitter: TCustomSplitter
);
begin
// TODO: beveled

View File

@ -152,7 +152,7 @@ uses Winceint;
{ TWinCEWSScrollBox }
function TWinCEWSScrollBox.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSScrollBox.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -178,7 +178,7 @@ end;
function ScrollWindowPtr(hWnd:HWND; dx:longint; dy:longint; prcScroll:lpRECT; prcClip:lpRECT;hrgnUpdate:HRGN;
prcUpdate:LPRECT; flags:UINT):longint; external UserDLLCore name 'ScrollWindowEx';
procedure TWinCEWSScrollingWinControl.ScrollBy(const AWinControl: TScrollingWinControl;
class procedure TWinCEWSScrollingWinControl.ScrollBy(const AWinControl: TScrollingWinControl;
const DeltaX, DeltaY: integer);
var
lVisible: boolean;
@ -271,7 +271,7 @@ begin
{$endif}
end;
procedure TWinCEWSCustomForm.SetBorderIcons(const AForm: TCustomForm;
class procedure TWinCEWSCustomForm.SetBorderIcons(const AForm: TCustomForm;
const ABorderIcons: TBorderIcons);
begin
UpdateWindowStyle(AForm.Handle, CalcBorderIconsFlags(AForm),
@ -279,7 +279,7 @@ begin
SetIcon(AForm, 0);
end;
procedure TWinCEWSCustomForm.SetFormBorderStyle(const AForm: TCustomForm;
class procedure TWinCEWSCustomForm.SetFormBorderStyle(const AForm: TCustomForm;
const AFormBorderStyle: TFormBorderStyle);
begin
RecreateWnd(AForm);
@ -309,7 +309,7 @@ begin
SizeRect.Bottom - SizeRect.Top);
end;
procedure TWinCEWSCustomForm.SetIcon(const AForm: TCustomForm; const AIcon: HICON);
class procedure TWinCEWSCustomForm.SetIcon(const AForm: TCustomForm; const AIcon: HICON);
var
winHandle: HWND;
iconHandle: HICON;
@ -327,7 +327,7 @@ begin
SendMessage(winHandle, WM_SETICON, ICON_BIG, iconHandle);
end;
procedure TWinCEWSCustomForm.SetShowInTaskbar(const AForm: TCustomForm;
class procedure TWinCEWSCustomForm.SetShowInTaskbar(const AForm: TCustomForm;
const AValue: TShowInTaskbar);
begin
if not AForm.HandleAllocated then exit;
@ -337,7 +337,7 @@ begin
RecreateWnd(AForm);
end;
procedure TWinCEWSCustomForm.ShowModal(const ACustomForm: TCustomForm);
class procedure TWinCEWSCustomForm.ShowModal(const ACustomForm: TCustomForm);
begin
DisableApplicationWindows(ACustomForm.Handle);
ShowWindow(ACustomForm.Handle, SW_SHOW);

View File

@ -112,7 +112,7 @@ begin
DisposePWideChar(pwnewValueText);
end;
function TWinCEWSCustomFloatSpinEdit.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomFloatSpinEdit.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -140,7 +140,7 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSCustomFloatSpinEdit.AdaptBounds(const AWinControl: TWinControl;
class procedure TWinCEWSCustomFloatSpinEdit.AdaptBounds(const AWinControl: TWinControl;
var Left, Top, Width, Height: integer; var SuppressMove: boolean);
var
WinHandle, BuddyHandle: HWND;
@ -154,19 +154,19 @@ begin
SuppressMove := true;
end;
function TWinCEWSCustomFloatSpinEdit.GetSelStart(
class function TWinCEWSCustomFloatSpinEdit.GetSelStart(
const ACustomFloatSpinEdit: TCustomFloatSpinEdit): integer;
begin
Result := EditGetSelStart(GetBuddyWindow(ACustomFloatSpinEdit.Handle));
end;
function TWinCEWSCustomFloatSpinEdit.GetSelLength(
class function TWinCEWSCustomFloatSpinEdit.GetSelLength(
const ACustomFloatSpinEdit: TCustomFloatSpinEdit): integer;
begin
Result := EditGetSelLength(GetBuddyWindow(ACustomFloatSpinEdit.Handle));
end;
function TWinCEWSCustomFloatSpinEdit.GetText(const AWinControl: TWinControl;
class function TWinCEWSCustomFloatSpinEdit.GetText(const AWinControl: TWinControl;
var AText: string): boolean;
begin
Result := AWinControl.HandleAllocated;
@ -175,25 +175,25 @@ begin
AText := GetControlText(GetBuddyWindow(AWinControl.Handle));
end;
function TWinCEWSCustomFloatSpinEdit.GetValue(
class function TWinCEWSCustomFloatSpinEdit.GetValue(
const ACustomFloatSpinEdit: TCustomFloatSpinEdit): single;
begin
Result := GetWindowInfo(ACustomFloatSpinEdit.Handle)^.spinValue;
end;
procedure TWinCEWSCustomFloatSpinEdit.SetSelStart(
class procedure TWinCEWSCustomFloatSpinEdit.SetSelStart(
const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewStart: integer);
begin
EditSetSelStart(GetBuddyWindow(ACustomFloatSpinEdit.Handle), NewStart);
end;
procedure TWinCEWSCustomFloatSpinEdit.SetSelLength(
class procedure TWinCEWSCustomFloatSpinEdit.SetSelLength(
const ACustomFloatSpinEdit: TCustomFloatSpinEdit; NewLength: integer);
begin
EditSetSelLength(GetBuddyWindow(ACustomFloatSpinEdit.Handle), NewLength);
end;
procedure TWinCEWSCustomFloatSpinEdit.ShowHide(const AWinControl: TWinControl);
class procedure TWinCEWSCustomFloatSpinEdit.ShowHide(const AWinControl: TWinControl);
var
Buddy: HWND;
begin
@ -206,7 +206,7 @@ begin
ShowWindow(Buddy, SW_HIDE);
end;
procedure TWinCEWSCustomFloatSpinEdit.UpdateControl(
class procedure TWinCEWSCustomFloatSpinEdit.UpdateControl(
const ACustomFloatSpinEdit: TCustomFloatSpinEdit);
begin
UpdateFloatSpinEditControl(ACustomFloatSpinEdit.Handle, ACustomFloatSpinEdit);

View File

@ -284,7 +284,7 @@ implementation
{ TWinCEWSScrollBar }
function TWinCEWSScrollBar.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSScrollBar.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -307,7 +307,7 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSScrollBar.SetParams(const AScrollBar: TCustomScrollBar);
class procedure TWinCEWSScrollBar.SetParams(const AScrollBar: TCustomScrollBar);
begin
with AScrollBar do
begin
@ -343,7 +343,7 @@ begin
end;
end;
function TWinCEWSCustomGroupBox.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomGroupBox.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -370,7 +370,7 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSCustomGroupBox.AdaptBounds(const AWinControl: TWinControl;
class procedure TWinCEWSCustomGroupBox.AdaptBounds(const AWinControl: TWinControl;
var Left, Top, Width, Height: integer; var SuppressMove: boolean);
var
WinHandle, BuddyHandle: HWND;
@ -389,7 +389,7 @@ end;
{ TWinCEWSCustomListBox }
function TWinCEWSCustomListBox.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomListBox.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -429,7 +429,7 @@ begin
end;
//this should not be called in multiple selection things
function TWinCEWSCustomListBox.GetItemIndex(const ACustomListBox: TCustomListBox): integer;
class function TWinCEWSCustomListBox.GetItemIndex(const ACustomListBox: TCustomListBox): integer;
begin
Result := SendMessage(ACustomListBox.Handle, LB_GETCURSEL, 0, 0);
if Result = LB_ERR then
@ -439,7 +439,7 @@ begin
end;
end;
function TWinCEWSCustomListBox.GetSelCount(const ACustomListBox: TCustomListBox): integer;
class function TWinCEWSCustomListBox.GetSelCount(const ACustomListBox: TCustomListBox): integer;
begin
// GetSelCount only works for multiple-selection listboxes
if ACustomListBox.MultiSelect then
@ -452,7 +452,7 @@ begin
end;
end;
function TWinCEWSCustomListBox.GetSelected(const ACustomListBox: TCustomListBox; const AIndex: integer): boolean;
class function TWinCEWSCustomListBox.GetSelected(const ACustomListBox: TCustomListBox; const AIndex: integer): boolean;
var
WindowInfo: PWindowInfo;
winHandle: HWND;
@ -466,7 +466,7 @@ begin
Result := Windows.SendMessage(winHandle, LB_GETSEL, Windows.WParam(AIndex), 0) > 0;
end;
function TWinCEWSCustomListBox.GetStrings(const ACustomListBox: TCustomListBox): TStrings;
class function TWinCEWSCustomListBox.GetStrings(const ACustomListBox: TCustomListBox): TStrings;
var
Handle: HWND;
begin
@ -475,12 +475,12 @@ begin
GetWindowInfo(Handle)^.List := Result;
end;
function TWinCEWSCustomListBox.GetTopIndex(const ACustomListBox: TCustomListBox): integer;
class function TWinCEWSCustomListBox.GetTopIndex(const ACustomListBox: TCustomListBox): integer;
begin
Result:=Windows.SendMessage(ACustomListBox.Handle, LB_GETTOPINDEX, 0, 0);
end;
procedure TWinCEWSCustomListBox.SelectItem(const ACustomListBox: TCustomListBox; AIndex: integer; ASelected: boolean);
class procedure TWinCEWSCustomListBox.SelectItem(const ACustomListBox: TCustomListBox; AIndex: integer; ASelected: boolean);
begin
if ACustomListBox.MultiSelect then
Windows.SendMessage(ACustomListBox.Handle, LB_SETSEL,
@ -492,7 +492,7 @@ begin
SetItemIndex(ACustomListBox, -1);
end;
procedure TWinCEWSCustomListBox.SetBorder(const ACustomListBox: TCustomListBox);
class procedure TWinCEWSCustomListBox.SetBorder(const ACustomListBox: TCustomListBox);
var
Handle: HWND;
StyleEx: dword;
@ -506,7 +506,7 @@ begin
SetWindowLong(Handle, GWL_EXSTYLE, StyleEx);
end;
procedure TWinCEWSCustomListBox.SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer);
class procedure TWinCEWSCustomListBox.SetItemIndex(const ACustomListBox: TCustomListBox; const AIndex: integer);
var
Handle: HWND;
begin
@ -521,24 +521,24 @@ begin
Windows.SendMessage(Handle, LB_SETCURSEL, Windows.WParam(AIndex), 0);
end;
procedure TWinCEWSCustomListBox.SetSelectionMode(const ACustomListBox: TCustomListBox;
class procedure TWinCEWSCustomListBox.SetSelectionMode(const ACustomListBox: TCustomListBox;
const AExtendedSelect, AMultiSelect: boolean);
begin
RecreateWnd(ACustomListBox);
end;
procedure TWinCEWSCustomListBox.SetStyle(const ACustomListBox: TCustomListBox);
class procedure TWinCEWSCustomListBox.SetStyle(const ACustomListBox: TCustomListBox);
begin
// The listbox styles can't be updated, so recreate the listbox
RecreateWnd(ACustomListBox);
end;
procedure TWinCEWSCustomListBox.SetSorted(const ACustomListBox: TCustomListBox; AList: TStrings; ASorted: boolean);
class procedure TWinCEWSCustomListBox.SetSorted(const ACustomListBox: TCustomListBox; AList: TStrings; ASorted: boolean);
begin
TWinCEListStringList(AList).Sorted := ASorted;
end;
procedure TWinCEWSCustomListBox.SetTopIndex(const ACustomListBox: TCustomListBox; const NewTopIndex: integer);
class procedure TWinCEWSCustomListBox.SetTopIndex(const ACustomListBox: TCustomListBox; const NewTopIndex: integer);
begin
Windows.SendMessage(ACustomListBox.Handle, LB_SETTOPINDEX, NewTopIndex, 0);
end;
@ -562,7 +562,7 @@ begin
Result := Result or ComboBoxReadOnlyStyles[AComboBox.ReadOnly];
end;
function TWinCEWSCustomComboBox.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomComboBox.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -600,7 +600,7 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSCustomComboBox.AdaptBounds(const AWinControl: TWinControl;
class procedure TWinCEWSCustomComboBox.AdaptBounds(const AWinControl: TWinControl;
var Left, Top, Width, Height: integer; var SuppressMove: boolean);
var
WinHandle: HWND;
@ -612,12 +612,12 @@ begin
Height := StringList.ComboHeight;
end;
function TWinCEWSCustomComboBox.GetSelStart(const ACustomComboBox: TCustomComboBox): integer;
class function TWinCEWSCustomComboBox.GetSelStart(const ACustomComboBox: TCustomComboBox): integer;
begin
SendMessage(ACustomComboBox.Handle, CB_GETEDITSEL, Windows.WPARAM(@Result), Windows.LPARAM(nil));
end;
function TWinCEWSCustomComboBox.GetSelLength(const ACustomComboBox: TCustomComboBox): integer;
class function TWinCEWSCustomComboBox.GetSelLength(const ACustomComboBox: TCustomComboBox): integer;
var
startPos, endPos: dword;
begin
@ -625,7 +625,7 @@ begin
Result := endPos - startPos;
end;
procedure TWinCEWSCustomComboBox.SetStyle(const ACustomComboBox: TCustomComboBox; NewStyle: TComboBoxStyle);
class procedure TWinCEWSCustomComboBox.SetStyle(const ACustomComboBox: TCustomComboBox; NewStyle: TComboBoxStyle);
var
CurrentStyle: dword;
begin
@ -637,7 +637,7 @@ begin
RecreateWnd(ACustomComboBox);
end;
function TWinCEWSCustomComboBox.GetItemIndex(const ACustomComboBox: TCustomComboBox): integer;
class function TWinCEWSCustomComboBox.GetItemIndex(const ACustomComboBox: TCustomComboBox): integer;
begin
Result := SendMessage(ACustomComboBox.Handle, CB_GETCURSEL, 0, 0);
if Result = LB_ERR Then
@ -648,12 +648,12 @@ begin
End;
end;
function TWinCEWSCustomComboBox.GetMaxLength(const ACustomComboBox: TCustomComboBox): integer;
class function TWinCEWSCustomComboBox.GetMaxLength(const ACustomComboBox: TCustomComboBox): integer;
begin
Result := GetWindowInfo(ACustomComboBox.Handle)^.MaxLength;
end;
function TWinCEWSCustomComboBox.GetText(const AWinControl: TWinControl; var AText: string): boolean;
class function TWinCEWSCustomComboBox.GetText(const AWinControl: TWinControl; var AText: string): boolean;
begin
Result := AWinControl.HandleAllocated;
if not Result then
@ -661,18 +661,18 @@ begin
AText := GetControlText(AWinControl.Handle);
end;
procedure TWinCEWSCustomComboBox.SetArrowKeysTraverseList(const ACustomComboBox: TCustomComboBox;
class procedure TWinCEWSCustomComboBox.SetArrowKeysTraverseList(const ACustomComboBox: TCustomComboBox;
NewTraverseList: boolean);
begin
// TODO: implement me?
end;
procedure TWinCEWSCustomComboBox.SetSelStart(const ACustomComboBox: TCustomComboBox; NewStart: integer);
class procedure TWinCEWSCustomComboBox.SetSelStart(const ACustomComboBox: TCustomComboBox; NewStart: integer);
begin
SendMessage(ACustomComboBox.Handle, CB_SETEDITSEL, 0, MakeLParam(NewStart, NewStart));
end;
procedure TWinCEWSCustomComboBox.SetSelLength(const ACustomComboBox: TCustomComboBox; NewLength: integer);
class procedure TWinCEWSCustomComboBox.SetSelLength(const ACustomComboBox: TCustomComboBox; NewLength: integer);
var
startpos, endpos: integer;
winhandle: HWND;
@ -683,12 +683,12 @@ begin
SendMessage(winhandle, CB_SETEDITSEL, 0, MakeLParam(startpos, endpos));
end;
procedure TWinCEWSCustomComboBox.SetItemIndex(const ACustomComboBox: TCustomComboBox; NewIndex: integer);
class procedure TWinCEWSCustomComboBox.SetItemIndex(const ACustomComboBox: TCustomComboBox; NewIndex: integer);
begin
SendMessage(ACustomComboBox.Handle, CB_SETCURSEL, Windows.WParam(NewIndex), 0);
end;
procedure TWinCEWSCustomComboBox.SetMaxLength(const ACustomComboBox: TCustomComboBox; NewLength: integer);
class procedure TWinCEWSCustomComboBox.SetMaxLength(const ACustomComboBox: TCustomComboBox; NewLength: integer);
var
winhandle: HWND;
begin
@ -697,13 +697,13 @@ begin
GetWindowInfo(winhandle)^.MaxLength := NewLength;
end;
procedure TWinCEWSCustomComboBox.SetReadOnly(const ACustomComboBox: TCustomComboBox;
class procedure TWinCEWSCustomComboBox.SetReadOnly(const ACustomComboBox: TCustomComboBox;
NewReadOnly: boolean);
begin
RecreateWnd(ACustomComboBox);
end;
procedure TWinCEWSCustomComboBox.SetText(const AWinControl: TWinControl; const AText: string);
class procedure TWinCEWSCustomComboBox.SetText(const AWinControl: TWinControl; const AText: string);
var
Handle: HWND;
pwAText : pWideChar;
@ -718,7 +718,7 @@ begin
DisposePWideChar(pwAText);
end;
function TWinCEWSCustomComboBox.GetItems(const ACustomComboBox: TCustomComboBox): TStrings;
class function TWinCEWSCustomComboBox.GetItems(const ACustomComboBox: TCustomComboBox): TStrings;
var
winhandle: HWND;
begin
@ -727,7 +727,7 @@ begin
GetWindowInfo(winhandle)^.List := Result;
end;
procedure TWinCEWSCustomComboBox.Sort(const ACustomComboBox: TCustomComboBox; AList: TStrings; IsSorted: boolean);
class procedure TWinCEWSCustomComboBox.Sort(const ACustomComboBox: TCustomComboBox; AList: TStrings; IsSorted: boolean);
begin
TWinCEListStringList(AList).Sorted := IsSorted;
end;
@ -767,7 +767,7 @@ end;
{ TWinCEWSCustomEdit }
function TWinCEWSCustomEdit.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomEdit.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
hwnd: THandle;
@ -799,22 +799,22 @@ begin
Result := hwnd;
end;
function TWinCEWSCustomEdit.GetSelStart(const ACustomEdit: TCustomEdit): integer;
class function TWinCEWSCustomEdit.GetSelStart(const ACustomEdit: TCustomEdit): integer;
begin
Result := EditGetSelStart(ACustomEdit.Handle);
end;
function TWinCEWSCustomEdit.GetSelLength(const ACustomEdit: TCustomEdit): integer;
class function TWinCEWSCustomEdit.GetSelLength(const ACustomEdit: TCustomEdit): integer;
begin
Result := EditGetSelLength(ACustomEdit.Handle);
end;
function TWinCEWSCustomEdit.GetMaxLength(const ACustomEdit: TCustomEdit): integer;
class function TWinCEWSCustomEdit.GetMaxLength(const ACustomEdit: TCustomEdit): integer;
begin
Result := GetWindowInfo(ACustomEdit.Handle)^.MaxLength;
end;
function TWinCEWSCustomEdit.GetText(const AWinControl: TWinControl; var AText: string): boolean;
class function TWinCEWSCustomEdit.GetText(const AWinControl: TWinControl; var AText: string): boolean;
begin
Result := AWinControl.HandleAllocated;
if not Result then
@ -822,7 +822,7 @@ begin
AText := GetControlText(AWinControl.Handle);
end;
procedure TWinCEWSCustomEdit.SetCharCase(const ACustomEdit: TCustomEdit; NewCase: TEditCharCase);
class procedure TWinCEWSCustomEdit.SetCharCase(const ACustomEdit: TCustomEdit; NewCase: TEditCharCase);
const
EditStyles: array[TEditCharCase] of integer = (0, ES_UPPERCASE, ES_LOWERCASE);
EditStyleMask = ES_UPPERCASE or ES_LOWERCASE;
@ -830,11 +830,11 @@ begin
UpdateWindowStyle(ACustomEdit.Handle, EditStyles[NewCase], EditStyleMask);
end;
procedure TWinCEWSCustomEdit.SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode);
class procedure TWinCEWSCustomEdit.SetEchoMode(const ACustomEdit: TCustomEdit; NewMode: TEchoMode);
begin
end;
procedure TWinCEWSCustomEdit.SetMaxLength(const ACustomEdit: TCustomEdit; NewLength: integer);
class procedure TWinCEWSCustomEdit.SetMaxLength(const ACustomEdit: TCustomEdit; NewLength: integer);
var
winhandle: HWND;
begin
@ -843,29 +843,29 @@ begin
GetWindowInfo(winhandle)^.MaxLength := NewLength;
end;
procedure TWinCEWSCustomEdit.SetPasswordChar(const ACustomEdit: TCustomEdit; NewChar: char);
class procedure TWinCEWSCustomEdit.SetPasswordChar(const ACustomEdit: TCustomEdit; NewChar: char);
begin
SendMessage(ACustomEdit.Handle, EM_SETPASSWORDCHAR, WParam(NewChar), 0);
end;
procedure TWinCEWSCustomEdit.SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean);
class procedure TWinCEWSCustomEdit.SetReadOnly(const ACustomEdit: TCustomEdit; NewReadOnly: boolean);
begin
Windows.SendMessage(ACustomEdit.Handle, EM_SETREADONLY, Windows.WPARAM(NewReadOnly), 0);
end;
procedure TWinCEWSCustomEdit.SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer);
class procedure TWinCEWSCustomEdit.SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer);
begin
EditSetSelStart(ACustomEdit.Handle, NewStart);
end;
procedure TWinCEWSCustomEdit.SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer);
class procedure TWinCEWSCustomEdit.SetSelLength(const ACustomEdit: TCustomEdit; NewLength: integer);
begin
EditSetSelLength(ACustomEdit.Handle, NewLength);
end;
{ TWinCEWSCustomMemo }
function TWinCEWSCustomMemo.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomMemo.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -901,13 +901,13 @@ begin
Result := Params.Window;
end;
function TWinCEWSCustomMemo.GetStrings(const ACustomMemo: TCustomMemo
class function TWinCEWSCustomMemo.GetStrings(const ACustomMemo: TCustomMemo
): TStrings;
begin
Result:=TWinCEMemoStrings.Create(ACustomMemo.Handle, ACustomMemo)
end;
procedure TWinCEWSCustomMemo.AppendText(const ACustomMemo: TCustomMemo; const AText: string);
class procedure TWinCEWSCustomMemo.AppendText(const ACustomMemo: TCustomMemo; const AText: string);
var
S: string;
begin
@ -919,13 +919,13 @@ begin
end;
end;
procedure TWinCEWSCustomMemo.SetScrollbars(const ACustomMemo: TCustomMemo; const NewScrollbars: TScrollStyle);
class procedure TWinCEWSCustomMemo.SetScrollbars(const ACustomMemo: TCustomMemo; const NewScrollbars: TScrollStyle);
begin
// TODO: check if can be done without recreation
RecreateWnd(ACustomMemo);
end;
procedure TWinCEWSCustomMemo.SetText(const AWinControl: TWinControl; const AText: string);
class procedure TWinCEWSCustomMemo.SetText(const AWinControl: TWinControl; const AText: string);
var
tmpWideStr : PWideChar;
begin
@ -934,7 +934,7 @@ begin
DisposePWideChar(tmpWideStr);
end;
procedure TWinCEWSCustomMemo.SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean);
class procedure TWinCEWSCustomMemo.SetWordWrap(const ACustomMemo: TCustomMemo; const NewWordWrap: boolean);
begin
// TODO: check if can be done without recreation
RecreateWnd(ACustomMemo);
@ -949,7 +949,7 @@ begin
Result := AlignmentToStaticTextFlags[Alignment];
end;
function TWinCEWSCustomStaticText.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomStaticText.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -975,14 +975,14 @@ begin
Result := Params.Window;
end;
procedure TWinCEWSCustomStaticText.SetAlignment(const ACustomStaticText: TCustomStaticText; const NewAlignment: TAlignment);
class procedure TWinCEWSCustomStaticText.SetAlignment(const ACustomStaticText: TCustomStaticText; const NewAlignment: TAlignment);
begin
// can not apply on the fly: needs window recreate
RecreateWnd(ACustomStaticText);
end;
{ TWin32WSButtonControl }
procedure TWinCEWSButtonControl.GetPreferredSize(const AWinControl: TWinControl;
class procedure TWinCEWSButtonControl.GetPreferredSize(const AWinControl: TWinControl;
var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean);
begin
if MeasureText(AWinControl, AWinControl.Caption, PreferredWidth, PreferredHeight) then
@ -995,7 +995,7 @@ end;
{ TWinCEWSCustomCheckBox }
function TWinCEWSCustomCheckBox.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSCustomCheckBox.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -1022,7 +1022,7 @@ begin
end;
procedure TWinCEWSCustomCheckBox.GetPreferredSize(const AWinControl: TWinControl;
class procedure TWinCEWSCustomCheckBox.GetPreferredSize(const AWinControl: TWinControl;
var PreferredWidth, PreferredHeight: integer; WithThemeSpace: Boolean);
var
iconHeight: integer;
@ -1037,7 +1037,7 @@ begin
end;
end;
function TWinCEWSCustomCheckBox.RetrieveState(const ACustomCheckBox: TCustomCheckBox): TCheckBoxState;
class function TWinCEWSCustomCheckBox.RetrieveState(const ACustomCheckBox: TCustomCheckBox): TCheckBoxState;
begin
case SendMessage(ACustomCheckBox.Handle, BM_GETCHECK, 0, 0) of
BST_CHECKED: Result := cbChecked;
@ -1047,13 +1047,13 @@ begin
end;
end;
procedure TWinCEWSCustomCheckBox.SetShortCut(const ACustomCheckBox: TCustomCheckBox;
class procedure TWinCEWSCustomCheckBox.SetShortCut(const ACustomCheckBox: TCustomCheckBox;
const OldShortCut, NewShortCut: TShortCut);
begin
// TODO: implement me!
end;
procedure TWinCEWSCustomCheckBox.SetState(const ACustomCheckBox: TCustomCheckBox; const NewState: TCheckBoxState);
class procedure TWinCEWSCustomCheckBox.SetState(const ACustomCheckBox: TCustomCheckBox; const NewState: TCheckBoxState);
var
Flags: WPARAM;
begin
@ -1068,7 +1068,7 @@ end;
{ TWinCEWSToggleBox }
function TWinCEWSToggleBox.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSToggleBox.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;
@ -1089,7 +1089,7 @@ end;
{ TWinCEWSRadioButton }
function TWinCEWSRadioButton.CreateHandle(const AWinControl: TWinControl;
class function TWinCEWSRadioButton.CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND;
var
Params: TCreateWindowExParams;