Removes a useless ws non-virtual method. ws classes should have only virtual methods

git-svn-id: trunk@31702 -
This commit is contained in:
sekelsenmat 2011-07-14 13:17:55 +00:00
parent 0c7f706dd4
commit 09171ba1ef
3 changed files with 8 additions and 19 deletions

View File

@ -146,7 +146,7 @@ begin
begin
PageControlHandle := AWinControl.Parent.Handle;
PageIndex := TCustomPage(AWinControl).PageIndex;
RealIndex := TWin32WSCustomNotebook.GetPageRealIndex(TCustomNotebook(AWinControl.Parent), PageIndex);
RealIndex := TCustomNotebook(AWinControl.Parent).PageToTabIndex(PageIndex);
if RealIndex <> -1 then
begin
Windows.SendMessage(PageControlHandle, TCM_DELETEITEM, Windows.WPARAM(RealIndex), 0);
@ -178,7 +178,7 @@ var
NotebookHandle: HWND;
begin
PageIndex := TCustomPage(AWinControl).PageIndex;
RealIndex := TWin32WSCustomNotebook.GetPageRealIndex(TCustomNotebook(AWinControl.Parent), PageIndex);
RealIndex := TCustomNotebook(AWinControl.Parent).PageToTabIndex(PageIndex);
NotebookHandle := AWinControl.Parent.Handle;
// We can't set label of a page not yet added,
// Check for valid page index
@ -216,7 +216,7 @@ var
NotebookHandle: HWND;
begin
PageIndex := ACustomPage.PageIndex;
RealIndex := TWin32WSCustomNotebook.GetPageRealIndex(TCustomNotebook(ACustomPage.Parent), PageIndex);
RealIndex := TCustomNotebook(ACustomPage.Parent).PageToTabIndex(PageIndex);
NotebookHandle := ACustomPage.Parent.Handle;
// Check for valid page index
if (RealIndex >= 0) and (RealIndex < Windows.SendMessage(NotebookHandle, TCM_GETITEMCOUNT,0,0)) then
@ -550,7 +550,7 @@ begin
// get the current top window
OldPageHandle := GetTopWindow(NotebookHandle);
NewPageHandle := 0;
NewRealIndex := GetPageRealIndex(ANotebook, AIndex);
NewRealIndex := ANotebook.PageToTabIndex(AIndex);
SendMessage(NotebookHandle, TCM_SETCURSEL, Windows.WParam(NewRealIndex), 0);

View File

@ -146,7 +146,7 @@ begin
begin
PageControlHandle := AWinControl.Parent.Handle;
PageIndex := TCustomPage(AWinControl).PageIndex;
RealIndex := TWinCEWSCustomNotebook.GetPageRealIndex(TCustomNotebook(AWinControl.Parent), PageIndex);
RealIndex := TCustomNotebook(AWinControl.Parent).PageToTabIndex(PageIndex);
if RealIndex <> -1 then
Windows.SendMessage(PageControlHandle, TCM_DELETEITEM,
Windows.WPARAM(RealIndex), 0);
@ -161,7 +161,7 @@ var
NotebookHandle: HWND;
begin
PageIndex := TCustomPage(AWinControl).PageIndex;
RealIndex := TWinCEWSCustomNotebook.GetPageRealIndex(TCustomNotebook(AWinControl.Parent), PageIndex);
RealIndex := TCustomNotebook(AWinControl.Parent).PageToTabIndex(PageIndex);
NotebookHandle := AWinControl.Parent.Handle;
// We can't set label of a page not yet added,
// Check for valid page index
@ -192,7 +192,7 @@ var
NotebookHandle: HWND;
begin
PageIndex := ACustomPage.PageIndex;
RealIndex := TWinCEWSCustomNotebook.GetPageRealIndex(TCustomNotebook(ACustomPage.Parent), PageIndex);
RealIndex := TCustomNotebook(ACustomPage.Parent).PageToTabIndex(PageIndex);
NotebookHandle := ACustomPage.Parent.Handle;
// Check for valid page index
if (RealIndex >= 0) and (RealIndex < Windows.SendMessage(NotebookHandle, TCM_GETITEMCOUNT,0,0)) then
@ -459,7 +459,7 @@ begin
Handle := ANotebook.Handle;
OldRealIndex := SendMessage(Handle, TCM_GETCURSEL, 0, 0);
OldIndex := NotebookPageRealToLCLIndex(ANotebook, OldRealIndex);
NewRealIndex := GetPageRealIndex(ANotebook, AIndex);
NewRealIndex := ANotebook.PageToTabIndex(AIndex);
SendMessage(Handle, TCM_SETCURSEL, Windows.WParam(NewRealIndex), 0);
if not (csDestroying in ANotebook.ComponentState) then
begin

View File

@ -68,7 +68,6 @@ type
class function GetNotebookMinTabHeight(const AWinControl: TWinControl): integer; virtual;
class function GetNotebookMinTabWidth(const AWinControl: TWinControl): integer; virtual;
class function GetPageRealIndex(const ANotebook: TCustomNotebook; AIndex: Integer): Integer; //virtual;
class function GetTabIndexAtPos(const ANotebook: TCustomNotebook; const AClientPos: TPoint): integer; virtual;
class function GetTabRect(const ANotebook: TCustomNotebook; const AIndex: Integer): TRect; virtual;
class function GetCapabilities: TNoteBookCapabilities; virtual;
@ -339,16 +338,6 @@ begin
Result:=60;
end;
class function TWSCustomNotebook.GetPageRealIndex(const ANotebook: TCustomNotebook;
AIndex: Integer): Integer;
begin
(* Get the Tab index from Page index.
No need to override, everything handled in the notebook.
*)
//Result := AIndex;
Result := ANotebook.PageToTabIndex(AIndex);
end;
class function TWSCustomNotebook.GetTabIndexAtPos(const ANotebook: TCustomNotebook;
const AClientPos: TPoint): integer;
begin