diff --git a/jvcl/run/JvPageList.pas b/jvcl/run/JvPageList.pas index d4f87f35cc..f7279a439e 100644 --- a/jvcl/run/JvPageList.pas +++ b/jvcl/run/JvPageList.pas @@ -38,23 +38,11 @@ interface {$IFDEF COMPILER9_UP} Types, {$ENDIF COMPILER9_UP} - JvComponent, JvThemes; + JvComponent, JvThemes, JvPageListInterface; type EPageListError = class(Exception); - IPageList = interface - ['{6BB90183-CFB1-4431-9CFD-E9A032E0C94C}'] - function CanChange(AIndex: Integer): Boolean; - procedure SetActivePageIndex(AIndex: Integer); - function GetPageCount: Integer; - function GetPageCaption(AIndex: Integer): string; - procedure AddPage(const ACaption: string); - procedure DeletePage(Index: Integer); - procedure MovePage(CurIndex, NewIndex: Integer); - procedure PageCaptionChanged(Index: Integer; const NewCaption: string); - end; - TJvCustomPageList = class; TJvPagePaintEvent = procedure(Sender: TObject; ACanvas: TCanvas; ARect: TRect) of object; diff --git a/jvcl/run/JvPageListInterface.pas b/jvcl/run/JvPageListInterface.pas new file mode 100644 index 0000000000..1b086f6f0c --- /dev/null +++ b/jvcl/run/JvPageListInterface.pas @@ -0,0 +1,45 @@ +{----------------------------------------------------------------------------- +The contents of this file are subject to the Mozilla Public License +Version 1.1 (the "License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at +http://www.mozilla.org/MPL/MPL-1.1.html + +Software distributed under the License is distributed on an "AS IS" basis, +WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for +the specific language governing rights and limitations under the License. + +The Original Code is: JvPageListInterface.pas, released on 2019-04-25. + +The Initial Developer of the Original Code is Markus Humm +Portions created by Markus Humm are Copyright (C) 2019 Markus Humm +All Rights Reserved. + +Contributor(s): + +You may retrieve the latest version of this file at the Project JEDI's JVCL home page, +located at http://jvcl.delphi-jedi.org + +Known Issues: +-----------------------------------------------------------------------------} +// $Id$ + +unit JvPageListInterface; + +interface + +type + IPageList = interface + ['{6BB90183-CFB1-4431-9CFD-E9A032E0C94C}'] + function CanChange(AIndex: Integer): Boolean; + procedure SetActivePageIndex(AIndex: Integer); + function GetPageCount: Integer; + function GetPageCaption(AIndex: Integer): string; + procedure AddPage(const ACaption: string); + procedure DeletePage(Index: Integer); + procedure MovePage(CurIndex, NewIndex: Integer); + procedure PageCaptionChanged(Index: Integer; const NewCaption: string); + end; + +implementation + +end. diff --git a/jvcl/run/JvTabBar.pas b/jvcl/run/JvTabBar.pas index 83f085e764..f47803da39 100644 --- a/jvcl/run/JvTabBar.pas +++ b/jvcl/run/JvTabBar.pas @@ -39,7 +39,7 @@ interface {$IFDEF HAS_UNIT_SYSTEM_UITYPES} System.UITypes, {$ENDIF HAS_UNIT_SYSTEM_UITYPES} - JvThemes; + JvThemes, JvPageListInterface; type TJvCustomTabBar = class; @@ -52,18 +52,6 @@ TJvTabBarItem = class; TJvGetModifiedEvent = procedure(Sender: TJvTabBarItem; var Modified: Boolean) of object; TJvGetEnabledEvent = procedure(Sender: TJvTabBarItem; var Enabled: Boolean) of object; - IPageList = interface - ['{6BB90183-CFB1-4431-9CFD-E9A032E0C94C}'] - function CanChange(AIndex: Integer): Boolean; - procedure SetActivePageIndex(AIndex: Integer); - function GetPageCount: Integer; - function GetPageCaption(AIndex: Integer): string; - procedure AddPage(const ACaption: string); - procedure DeletePage(Index: Integer); - procedure MovePage(CurIndex, NewIndex: Integer); - procedure PageCaptionChanged(Index: Integer; const NewCaption: string); - end; - TJvTabBarItem = class(TCollectionItem) private FLeft: Integer; // used for calculating DisplayRect