Renames TNotebookOption and friends to TCTabControlOptions,etc because the old name was completely wrong since TNotebook is completely unrelated to this type

git-svn-id: trunk@33537 -
This commit is contained in:
sekelsenmat 2011-11-15 07:28:07 +00:00
parent 55970dead8
commit fa02b703f1
13 changed files with 41 additions and 33 deletions

View File

@ -1323,24 +1323,24 @@
<short/>
</element>
<!-- enumeration type Visibility: default -->
<element name="TNoteBookOption">
<element name="TCTabControlOption">
<short>
<var>TNoteBookOption</var> - Show the close button on a tab, allow multi-line tabs</short>
<var>TCTabControlOption</var> - Show the close button on a tab, allow multi-line tabs</short>
<descr/>
<seealso/>
</element>
<!-- enumeration value Visibility: default -->
<element name="TNoteBookOption.nboShowCloseButtons">
<element name="TCTabControlOption.nboShowCloseButtons">
<short/>
</element>
<!-- enumeration value Visibility: default -->
<element name="TNoteBookOption.nboMultiLine">
<element name="TCTabControlOption.nboMultiLine">
<short/>
</element>
<!-- set type Visibility: default -->
<element name="TNoteBookOptions">
<element name="TCTabControlOptions">
<short>
<var>TNoteBookOptions</var> - set of <var>TNoteBookOption</var>
<var>TCTabControlOptions</var> - set of <var>TCTabControlOption</var>
</short>
<descr/>
<seealso/>
@ -2149,14 +2149,14 @@
<short>
<var>GetCapabilities</var> - returns the set of capabilities</short>
</element>
<element name="TNoteBookCapability">
<element name="TCTabControlCapability">
<short>
<var>TNoteBookCapability</var> - enumerated type containing possible capabilities of a notebook</short>
<descr>nbcShowCloseButtons, nbcMultiLine, nbcPageListPopup</descr>
<var>TCTabControlCapability</var> - enumerated type containing possible capabilities of a notebook</short>
<descr>nbcShowCloseButtons, nbcMultiLine, nbcPageListPopup, nbcShowAddTabButton</descr>
</element>
<element name="TNoteBookCapabilities">
<element name="TCTabControlCapabilities">
<short>
<var>TNoteBookCapabilities</var> - set of <var>TNoteBookCapability</var>
<var>TCTabControlCapabilities</var> - set of <var>TCTabControlCapability</var>
</short>
</element>
<!-- enumeration type Visibility: default -->

View File

@ -801,7 +801,7 @@ type
deprecated {$IFDEF VER2_5}'use SourceEditorManager'{$ENDIF}; // deprecated in 0.9.29 March 2010
public
function GetCapabilities: TNoteBookCapabilities;
function GetCapabilities: TCTabControlCapabilities;
procedure IncUpdateLock;
procedure DecUpdateLock;
@ -5965,7 +5965,7 @@ begin
Manager.OnCurrentCodeBufferChanged(Self);
end;
function TSourceNotebook.GetCapabilities: TNoteBookCapabilities;
function TSourceNotebook.GetCapabilities: TCTabControlCapabilities;
begin
Result := FNotebook.GetCapabilities
end;

View File

@ -297,12 +297,20 @@ type
TTabGetImageEvent = procedure(Sender: TObject; TabIndex: Integer;
var ImageIndex: Integer) of object;
TNoteBookOption = (
// These are LCL additions
TCTabControlOption = (
nboShowCloseButtons, nboMultiLine, nboHidePageListPopup,
nboKeyboardTabSwitch);
TNoteBookOptions = set of TNoteBookOption;
TNoteBookCapability = (nbcShowCloseButtons, nbcMultiLine, nbcPageListPopup);
TNoteBookCapabilities = set of TNoteBookCapability;
nboKeyboardTabSwitch, nboShowAddTabButton);
TCTabControlOptions = set of TCTabControlOption;
TCTabControlCapability = (nbcShowCloseButtons, nbcMultiLine, nbcPageListPopup, nbcShowAddTabButton);
TCTabControlCapabilities = set of TCTabControlCapability;
// Don't use anymore the old names of these types
// TNotebook is unrelated to CustomTabControl, so the types were renamed to
// better names
TNoteBookOption = TCTabControlOption deprecated;
TNoteBookOptions = TCTabControlOptions deprecated;
TNoteBookCapability = TCTabControlCapability deprecated;
TNoteBookCapabilities = TCTabControlCapabilities deprecated;
TDrawTabEvent = procedure(Control: TCustomTabControl; TabIndex: Integer;
const Rect: TRect; Active: Boolean) of object;
@ -321,7 +329,7 @@ type
FOnDrawTab: TDrawTabEvent;
FOnGetImageIndex: TTabGetImageEvent;
FOnPageChanged: TNotifyEvent;
FOptions: TNoteBookOptions;
FOptions: TCTabControlOptions;
FOwnerDraw: Boolean;
FPageIndex: Integer;
FPageIndexOnLastChange: integer;// needed for unique OnChange events
@ -352,7 +360,7 @@ type
procedure SetActivePage(const Value: String);
procedure SetActivePageComponent(const AValue: TCustomPage);
procedure SetImages(const AValue: TImageList);
procedure SetOptions(const AValue: TNoteBookOptions);
procedure SetOptions(const AValue: TCTabControlOptions);
procedure SetPageIndex(AValue: Integer);
procedure SetPages(AValue: TStrings);
procedure SetShowTabs(AValue: Boolean);
@ -423,7 +431,7 @@ type
write FOnCloseTabClicked;
property OnGetImageIndex: TTabGetImageEvent read FOnGetImageIndex
write FOnGetImageIndex;
property Options: TNoteBookOptions read FOptions write SetOptions default [];
property Options: TCTabControlOptions read FOptions write SetOptions default [];
property Page[Index: Integer]: TCustomPage read GetPage;
property PageCount: integer read GetPageCount;
property PageIndex: Integer read FPageIndex write SetPageIndex default -1;

View File

@ -501,9 +501,9 @@ begin
UpdateTabProperties;
end;
procedure TCustomTabControl.SetOptions(const AValue: TNoteBookOptions);
procedure TCustomTabControl.SetOptions(const AValue: TCTabControlOptions);
var
ChangedOptions: TNoteBookOptions;
ChangedOptions: TCTabControlOptions;
begin
if FOptions = AValue then Exit;
ChangedOptions := (FOptions - AValue) + (AValue - FOptions);

View File

@ -349,7 +349,7 @@ begin
UpdateNoteBookClientWidget(ATabControl);
end;
class function TGtk2WSCustomTabControl.GetCapabilities: TNoteBookCapabilities;
class function TGtk2WSCustomTabControl.GetCapabilities: TCTabControlCapabilities;
begin
Result:=[nbcPageListPopup, nbcShowCloseButtons];
end;

View File

@ -89,7 +89,7 @@ type
class procedure MovePage(const ATabControl: TCustomTabControl;
const AChild: TCustomPage; const NewIndex: integer); override;
class function GetCapabilities: TNoteBookCapabilities; override;
class function GetCapabilities: TCTabControlCapabilities; override;
class function GetNotebookMinTabHeight(const AWinControl: TWinControl): integer; override;
class function GetNotebookMinTabWidth(const AWinControl: TWinControl): integer; override;
class function GetTabIndexAtPos(const ATabControl: TCustomTabControl; const AClientPos: TPoint): integer; override;

View File

@ -164,7 +164,7 @@ begin
end;
end;
class function TQtWSCustomTabControl.GetCapabilities: TNoteBookCapabilities;
class function TQtWSCustomTabControl.GetCapabilities: TCTabControlCapabilities;
begin
Result := [nbcShowCloseButtons];
end;

View File

@ -62,7 +62,7 @@ type
class procedure RemovePage(const ATabControl: TCustomTabControl;
const AIndex: integer); override;
class function GetCapabilities: TNotebookCapabilities; override;
class function GetCapabilities: TCTabControlCapabilities; override;
class function GetDesignInteractive(const AWinControl: TWinControl; AClientPos: TPoint): Boolean; override;
class function GetTabIndexAtPos(const ATabControl: TCustomTabControl; const AClientPos: TPoint): integer; override;
class function GetTabRect(const ATabControl: TCustomTabControl; const AIndex: Integer): TRect; override;

View File

@ -508,7 +508,7 @@ begin
Result := inherited GetTabRect(ATabControl, AIndex);
end;
class function TWin32WSCustomNotebook.GetCapabilities: TNoteBookCapabilities;
class function TWin32WSCustomNotebook.GetCapabilities: TCTabControlCapabilities;
begin
Result:=[nbcMultiLine];
end;

View File

@ -72,7 +72,7 @@ type
class function GetTabIndexAtPos(const ATabControl: TCustomTabControl; const AClientPos: TPoint): integer; override;
class function GetTabRect(const ATabControl: TCustomTabControl; const AIndex: Integer): TRect; override;
class function GetCapabilities: TNoteBookCapabilities;override;
class function GetCapabilities: TCTabControlCapabilities;override;
class function GetDesignInteractive(const AWinControl: TWinControl; AClientPos: TPoint): Boolean; override;
class procedure SetImageList(const ATabControl: TCustomTabControl; const AImageList: TCustomImageList); override;
class procedure SetPageIndex(const ATabControl: TCustomTabControl; const AIndex: integer); override;

View File

@ -426,7 +426,7 @@ begin
Result := inherited GetTabRect(ATabControl, AIndex);
end;
class function TWinCEWSCustomNotebook.GetCapabilities: TNoteBookCapabilities;
class function TWinCEWSCustomNotebook.GetCapabilities: TCTabControlCapabilities;
begin
Result:=[];
end;

View File

@ -68,7 +68,7 @@ type
class function GetTabIndexAtPos(const ATabControl: TCustomTabControl; const AClientPos: TPoint): integer; override;
class function GetTabRect(const ATabControl: TCustomTabControl; const AIndex: Integer): TRect; override;
class function GetCapabilities: TNoteBookCapabilities;override;
class function GetCapabilities: TCTabControlCapabilities;override;
class function GetDesignInteractive(const AWinControl: TWinControl; AClientPos: TPoint): Boolean; override;
class procedure SetImageList(const ATabControl: TCustomTabControl; const AImageList: TCustomImageList); override;
class procedure SetPageIndex(const ATabControl: TCustomTabControl; const AIndex: integer); override;

View File

@ -70,7 +70,7 @@ type
class function GetNotebookMinTabWidth(const AWinControl: TWinControl): integer; virtual;
class function GetTabIndexAtPos(const ATabControl: TCustomTabControl; const AClientPos: TPoint): integer; virtual;
class function GetTabRect(const ATabControl: TCustomTabControl; const AIndex: Integer): TRect; virtual;
class function GetCapabilities: TNoteBookCapabilities; virtual;
class function GetCapabilities: TCTabControlCapabilities; virtual;
class procedure SetImageList(const ATabControl: TCustomTabControl; const AImageList: TCustomImageList); virtual;
class procedure SetPageIndex(const ATabControl: TCustomTabControl; const AIndex: integer); virtual;
class procedure SetTabCaption(const ATabControl: TCustomTabControl; const AChild: TCustomPage; const AText: string); virtual;
@ -350,7 +350,7 @@ begin
Result := Rect(-1,-1,-1,-1);
end;
class function TWSCustomTabControl.GetCapabilities: TNoteBookCapabilities;
class function TWSCustomTabControl.GetCapabilities: TCTabControlCapabilities;
begin
Result:=[];
end;