Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
f3563dc1
Commit
f3563dc1
authored
Jan 30, 2003
by
Boris Dorès
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed a segfault occuring when the preference dialog box was destroyed
parent
aafd6446
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
102 deletions
+81
-102
modules/gui/win32/preferences.cpp
modules/gui/win32/preferences.cpp
+64
-83
modules/gui/win32/preferences.h
modules/gui/win32/preferences.h
+17
-19
No files found.
modules/gui/win32/preferences.cpp
View file @
f3563dc1
...
@@ -52,35 +52,6 @@ void __fastcall TNarrowHintWindow::ActivateHint( const Windows::TRect &Rect,
...
@@ -52,35 +52,6 @@ void __fastcall TNarrowHintWindow::ActivateHint( const Windows::TRect &Rect,
THintWindow
::
ActivateHint
(
NarrowRect
,
AHint
);
THintWindow
::
ActivateHint
(
NarrowRect
,
AHint
);
}
}
/****************************************************************************
* Just a wrapper to embed an AnsiString into a TObject
****************************************************************************/
__fastcall
TObjectString
::
TObjectString
(
char
*
String
)
{
FString
=
AnsiString
(
String
);
}
//---------------------------------------------------------------------------
AnsiString
__fastcall
TObjectString
::
String
()
{
return
FString
;
}
/****************************************************************************
* A TCheckListBox that automatically disposes any TObject
* associated with the string items
****************************************************************************/
__fastcall
TCleanCheckListBox
::~
TCleanCheckListBox
()
{
for
(
int
i
=
0
;
i
<
Items
->
Count
;
i
++
)
{
if
(
Items
->
Objects
[
i
]
!=
NULL
)
delete
Items
->
Objects
[
i
];
}
}
/****************************************************************************
/****************************************************************************
* Functions to help components creation
* Functions to help components creation
****************************************************************************/
****************************************************************************/
...
@@ -94,16 +65,16 @@ __fastcall TPanelPref::TPanelPref( TComponent* Owner,
...
@@ -94,16 +65,16 @@ __fastcall TPanelPref::TPanelPref( TComponent* Owner,
BorderStyle
=
bsNone
;
BorderStyle
=
bsNone
;
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
T
CleanCheckListBox
*
__fastcall
TPanelPref
::
CreateClean
CheckListBox
(
T
ExtCheckListBox
*
__fastcall
TPanelPref
::
CreateExt
CheckListBox
(
TWinControl
*
Parent
,
int
Left
,
int
Width
,
int
Top
,
int
Height
)
TWinControl
*
Parent
,
int
Left
,
int
Width
,
int
Top
,
int
Height
)
{
{
T
CleanCheckListBox
*
CleanCheckListBox
=
new
TClean
CheckListBox
(
Parent
);
T
ExtCheckListBox
*
ExtCheckListBox
=
new
TExt
CheckListBox
(
Parent
);
Clean
CheckListBox
->
Parent
=
Parent
;
Ext
CheckListBox
->
Parent
=
Parent
;
Clean
CheckListBox
->
Left
=
Left
;
Ext
CheckListBox
->
Left
=
Left
;
Clean
CheckListBox
->
Width
=
Width
;
Ext
CheckListBox
->
Width
=
Width
;
Clean
CheckListBox
->
Top
=
Top
;
Ext
CheckListBox
->
Top
=
Top
;
Clean
CheckListBox
->
Height
=
Height
;
Ext
CheckListBox
->
Height
=
Height
;
return
Clean
CheckListBox
;
return
Ext
CheckListBox
;
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
TButton
*
__fastcall
TPanelPref
::
CreateButton
(
TWinControl
*
Parent
,
TButton
*
__fastcall
TPanelPref
::
CreateButton
(
TWinControl
*
Parent
,
...
@@ -198,9 +169,11 @@ TCSpinEdit * __fastcall TPanelPref::CreateSpinEdit( TWinControl *Parent,
...
@@ -198,9 +169,11 @@ TCSpinEdit * __fastcall TPanelPref::CreateSpinEdit( TWinControl *Parent,
****************************************************************************/
****************************************************************************/
__fastcall
TPanelPlugin
::
TPanelPlugin
(
TComponent
*
Owner
,
__fastcall
TPanelPlugin
::
TPanelPlugin
(
TComponent
*
Owner
,
module_config_t
*
p_config
,
intf_thread_t
*
_p_intf
,
module_config_t
*
p_config
,
intf_thread_t
*
_p_intf
,
bool
b_multi_plugins
)
:
TPanelPref
(
Owner
,
p_config
,
_p_intf
)
TStringList
*
ModuleNames
,
bool
b_multi_plugins
)
:
TPanelPref
(
Owner
,
p_config
,
_p_intf
)
{
{
this
->
b_multi_plugins
=
b_multi_plugins
;
this
->
b_multi_plugins
=
b_multi_plugins
;
this
->
ModuleNames
=
ModuleNames
;
/* init configure button */
/* init configure button */
ButtonConfig
=
CreateButton
(
this
,
ButtonConfig
=
CreateButton
(
this
,
...
@@ -229,24 +202,24 @@ __fastcall TPanelPlugin::TPanelPlugin( TComponent* Owner,
...
@@ -229,24 +202,24 @@ __fastcall TPanelPlugin::TPanelPlugin( TComponent* Owner,
ButtonConfig
->
Top
+=
(
Label
->
Height
-
ButtonConfig
->
Height
)
/
2
;
ButtonConfig
->
Top
+=
(
Label
->
Height
-
ButtonConfig
->
Height
)
/
2
;
/* init checklistbox */
/* init checklistbox */
CleanCheckListBox
=
CreateClean
CheckListBox
(
this
,
ExtCheckListBox
=
CreateExt
CheckListBox
(
this
,
LIBWIN32_PREFSIZE_EDIT_LEFT
,
LIBWIN32_PREFSIZE_EDIT_LEFT
,
LIBWIN32_PREFSIZE_EDIT_WIDTH
,
LIBWIN32_PREFSIZE_EDIT_WIDTH
,
max
(
Label
->
Top
+
Label
->
Height
,
ButtonConfig
->
Top
max
(
Label
->
Top
+
Label
->
Height
,
ButtonConfig
->
Top
+
ButtonConfig
->
Height
)
+
LIBWIN32_PREFSIZE_VPAD
,
+
ButtonConfig
->
Height
)
+
LIBWIN32_PREFSIZE_VPAD
,
LIBWIN32_PREFSIZE_CHECKLISTBOX_HEIGHT
);
LIBWIN32_PREFSIZE_CHECKLISTBOX_HEIGHT
);
Clean
CheckListBox
->
OnClick
=
CheckListBoxClick
;
Ext
CheckListBox
->
OnClick
=
CheckListBoxClick
;
Clean
CheckListBox
->
OnClickCheck
=
CheckListBoxClickCheck
;
Ext
CheckListBox
->
OnClickCheck
=
CheckListBoxClickCheck
;
Clean
CheckListBox
->
Hint
=
p_config
->
psz_longtext
;
Ext
CheckListBox
->
Hint
=
p_config
->
psz_longtext
;
Clean
CheckListBox
->
ShowHint
=
true
;
Ext
CheckListBox
->
ShowHint
=
true
;
/* init up and down buttons */
/* init up and down buttons */
if
(
b_multi_plugins
)
if
(
b_multi_plugins
)
{
{
ButtonUp
=
CreateButton
(
this
,
LIBWIN32_PREFSIZE_LEFT
,
ButtonUp
=
CreateButton
(
this
,
LIBWIN32_PREFSIZE_LEFT
,
Clean
CheckListBox
->
Left
-
LIBWIN32_PREFSIZE_HPAD
Ext
CheckListBox
->
Left
-
LIBWIN32_PREFSIZE_HPAD
-
LIBWIN32_PREFSIZE_LEFT
,
-
LIBWIN32_PREFSIZE_LEFT
,
CleanCheckListBox
->
Top
+
(
Clean
CheckListBox
->
Height
ExtCheckListBox
->
Top
+
(
Ext
CheckListBox
->
Height
-
2
*
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
)
/
3
,
-
2
*
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
)
/
3
,
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
,
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
,
"+"
);
"+"
);
...
@@ -256,9 +229,9 @@ __fastcall TPanelPlugin::TPanelPlugin( TComponent* Owner,
...
@@ -256,9 +229,9 @@ __fastcall TPanelPlugin::TPanelPlugin( TComponent* Owner,
ButtonUp
->
ShowHint
=
true
;
ButtonUp
->
ShowHint
=
true
;
ButtonDown
=
CreateButton
(
this
,
LIBWIN32_PREFSIZE_LEFT
,
ButtonDown
=
CreateButton
(
this
,
LIBWIN32_PREFSIZE_LEFT
,
Clean
CheckListBox
->
Left
-
LIBWIN32_PREFSIZE_HPAD
Ext
CheckListBox
->
Left
-
LIBWIN32_PREFSIZE_HPAD
-
LIBWIN32_PREFSIZE_LEFT
,
-
LIBWIN32_PREFSIZE_LEFT
,
CleanCheckListBox
->
Top
+
(
Clean
CheckListBox
->
Height
ExtCheckListBox
->
Top
+
(
Ext
CheckListBox
->
Height
-
2
*
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
)
*
2
/
3
-
2
*
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
)
*
2
/
3
+
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
,
+
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
,
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
,
LIBWIN32_PREFSIZE_BUTTON_HEIGHT
,
...
@@ -275,7 +248,7 @@ __fastcall TPanelPlugin::TPanelPlugin( TComponent* Owner,
...
@@ -275,7 +248,7 @@ __fastcall TPanelPlugin::TPanelPlugin( TComponent* Owner,
}
}
/* panel height */
/* panel height */
Height
=
CleanCheckListBox
->
Top
+
Clean
CheckListBox
->
Height
Height
=
ExtCheckListBox
->
Top
+
Ext
CheckListBox
->
Height
+
LIBWIN32_PREFSIZE_VPAD
;
+
LIBWIN32_PREFSIZE_VPAD
;
};
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
@@ -287,25 +260,25 @@ void __fastcall TPanelPlugin::CheckListBoxClick( TObject *Sender )
...
@@ -287,25 +260,25 @@ void __fastcall TPanelPlugin::CheckListBoxClick( TObject *Sender )
/* check that the click is valid (we are on an item, and the click
/* check that the click is valid (we are on an item, and the click
* started on an item */
* started on an item */
if
(
Clean
CheckListBox
->
ItemIndex
==
-
1
)
if
(
Ext
CheckListBox
->
ItemIndex
==
-
1
)
{
{
if
(
ButtonUp
!=
NULL
)
ButtonUp
->
Enabled
=
false
;
if
(
ButtonUp
!=
NULL
)
ButtonUp
->
Enabled
=
false
;
if
(
ButtonDown
!=
NULL
)
ButtonDown
->
Enabled
=
false
;
if
(
ButtonDown
!=
NULL
)
ButtonDown
->
Enabled
=
false
;
return
;
return
;
}
}
AnsiString
Name
=
((
TObjectString
*
)
CleanCheckListBox
->
Items
->
AnsiString
Name
=
ModuleNames
->
Strings
Objects
[
CleanCheckListBox
->
ItemIndex
])
->
String
().
c_str
()
;
[
ExtCheckListBox
->
GetItemData
(
ExtCheckListBox
->
ItemIndex
)]
;
if
(
Name
==
""
)
if
(
Name
==
""
)
return
;
return
;
/* enable up and down buttons */
/* enable up and down buttons */
if
(
b_multi_plugins
&&
ButtonUp
!=
NULL
&&
ButtonDown
!=
NULL
)
if
(
b_multi_plugins
&&
ButtonUp
!=
NULL
&&
ButtonDown
!=
NULL
)
{
{
if
(
Clean
CheckListBox
->
ItemIndex
==
0
)
if
(
Ext
CheckListBox
->
ItemIndex
==
0
)
ButtonUp
->
Enabled
=
false
;
else
ButtonUp
->
Enabled
=
true
;
ButtonUp
->
Enabled
=
false
;
else
ButtonUp
->
Enabled
=
true
;
if
(
Clean
CheckListBox
->
ItemIndex
if
(
Ext
CheckListBox
->
ItemIndex
==
Clean
CheckListBox
->
Items
->
Count
-
1
)
==
Ext
CheckListBox
->
Items
->
Count
-
1
)
ButtonDown
->
Enabled
=
false
;
else
ButtonDown
->
Enabled
=
true
;
ButtonDown
->
Enabled
=
false
;
else
ButtonDown
->
Enabled
=
true
;
}
}
...
@@ -333,13 +306,13 @@ void __fastcall TPanelPlugin::CheckListBoxClickCheck( TObject *Sender )
...
@@ -333,13 +306,13 @@ void __fastcall TPanelPlugin::CheckListBoxClickCheck( TObject *Sender )
if
(
!
b_multi_plugins
)
if
(
!
b_multi_plugins
)
{
{
/* one item maximum must be checked */
/* one item maximum must be checked */
if
(
CleanCheckListBox
->
Checked
[
Clean
CheckListBox
->
ItemIndex
]
)
if
(
ExtCheckListBox
->
Checked
[
Ext
CheckListBox
->
ItemIndex
]
)
{
{
for
(
int
item
=
0
;
item
<
Clean
CheckListBox
->
Items
->
Count
;
item
++
)
for
(
int
item
=
0
;
item
<
Ext
CheckListBox
->
Items
->
Count
;
item
++
)
{
{
if
(
item
!=
Clean
CheckListBox
->
ItemIndex
)
if
(
item
!=
Ext
CheckListBox
->
ItemIndex
)
{
{
Clean
CheckListBox
->
Checked
[
item
]
=
false
;
Ext
CheckListBox
->
Checked
[
item
]
=
false
;
}
}
}
}
}
}
...
@@ -354,23 +327,23 @@ void __fastcall TPanelPlugin::ButtonConfigClick( TObject *Sender )
...
@@ -354,23 +327,23 @@ void __fastcall TPanelPlugin::ButtonConfigClick( TObject *Sender )
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
__fastcall
TPanelPlugin
::
ButtonUpClick
(
TObject
*
Sender
)
void
__fastcall
TPanelPlugin
::
ButtonUpClick
(
TObject
*
Sender
)
{
{
if
(
CleanCheckListBox
->
ItemIndex
!=
-
1
&&
Clean
CheckListBox
->
ItemIndex
>
0
)
if
(
ExtCheckListBox
->
ItemIndex
!=
-
1
&&
Ext
CheckListBox
->
ItemIndex
>
0
)
{
{
int
Pos
=
Clean
CheckListBox
->
ItemIndex
;
int
Pos
=
Ext
CheckListBox
->
ItemIndex
;
Clean
CheckListBox
->
Items
->
Move
(
Pos
,
Pos
-
1
);
Ext
CheckListBox
->
Items
->
Move
(
Pos
,
Pos
-
1
);
Clean
CheckListBox
->
ItemIndex
=
Pos
-
1
;
Ext
CheckListBox
->
ItemIndex
=
Pos
-
1
;
CheckListBoxClick
(
Sender
);
CheckListBoxClick
(
Sender
);
}
}
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
__fastcall
TPanelPlugin
::
ButtonDownClick
(
TObject
*
Sender
)
void
__fastcall
TPanelPlugin
::
ButtonDownClick
(
TObject
*
Sender
)
{
{
if
(
Clean
CheckListBox
->
ItemIndex
!=
-
1
if
(
Ext
CheckListBox
->
ItemIndex
!=
-
1
&&
CleanCheckListBox
->
ItemIndex
<
Clean
CheckListBox
->
Items
->
Count
-
1
)
&&
ExtCheckListBox
->
ItemIndex
<
Ext
CheckListBox
->
Items
->
Count
-
1
)
{
{
int
Pos
=
Clean
CheckListBox
->
ItemIndex
;
int
Pos
=
Ext
CheckListBox
->
ItemIndex
;
Clean
CheckListBox
->
Items
->
Move
(
Pos
,
Pos
+
1
);
Ext
CheckListBox
->
Items
->
Move
(
Pos
,
Pos
+
1
);
Clean
CheckListBox
->
ItemIndex
=
Pos
+
1
;
Ext
CheckListBox
->
ItemIndex
=
Pos
+
1
;
CheckListBoxClick
(
Sender
);
CheckListBoxClick
(
Sender
);
}
}
}
}
...
@@ -397,13 +370,13 @@ void __fastcall TPanelPlugin::SetValue ( AnsiString Values )
...
@@ -397,13 +370,13 @@ void __fastcall TPanelPlugin::SetValue ( AnsiString Values )
if
(
Value
.
Length
()
>
0
)
if
(
Value
.
Length
()
>
0
)
{
{
for
(
int
i
=
TopChecked
;
i
<
Clean
CheckListBox
->
Items
->
Count
;
i
++
)
for
(
int
i
=
TopChecked
;
i
<
Ext
CheckListBox
->
Items
->
Count
;
i
++
)
{
{
if
(
((
TObjectString
*
)
CleanCheckListBox
->
Items
->
Objects
[
i
])
if
(
ModuleNames
->
Strings
[
ExtCheckListBox
->
GetItemData
(
i
)]
->
String
()
==
Value
)
==
Value
)
{
{
Clean
CheckListBox
->
Checked
[
i
]
=
true
;
Ext
CheckListBox
->
Checked
[
i
]
=
true
;
Clean
CheckListBox
->
Items
->
Move
(
i
,
TopChecked
);
Ext
CheckListBox
->
Items
->
Move
(
i
,
TopChecked
);
TopChecked
++
;
TopChecked
++
;
}
}
}
}
...
@@ -416,20 +389,19 @@ void __fastcall TPanelPlugin::UpdateChanges()
...
@@ -416,20 +389,19 @@ void __fastcall TPanelPlugin::UpdateChanges()
AnsiString
Name
=
""
;
AnsiString
Name
=
""
;
/* find the selected plugin (if any) */
/* find the selected plugin (if any) */
for
(
int
item
=
0
;
item
<
Clean
CheckListBox
->
Items
->
Count
;
item
++
)
for
(
int
item
=
0
;
item
<
Ext
CheckListBox
->
Items
->
Count
;
item
++
)
{
{
if
(
Clean
CheckListBox
->
Checked
[
item
]
)
if
(
Ext
CheckListBox
->
Checked
[
item
]
)
{
{
if
(
Name
.
Length
()
==
0
)
if
(
Name
.
Length
()
==
0
)
{
{
Name
=
((
TObjectString
*
)
CleanCheckListBox
->
Items
->
Objects
[
item
])
Name
=
ModuleNames
->
Strings
->
String
()
;
[
ExtCheckListBox
->
GetItemData
(
item
)]
;
}
}
else
else
{
{
Name
=
Name
+
","
Name
=
Name
+
","
+
ModuleNames
->
Strings
+
((
TObjectString
*
)
CleanCheckListBox
->
Items
->
Objects
[
item
])
[
ExtCheckListBox
->
GetItemData
(
item
)];
->
String
();
}
}
}
}
}
}
...
@@ -615,11 +587,17 @@ __fastcall TPreferencesDlg::TPreferencesDlg( TComponent* Owner,
...
@@ -615,11 +587,17 @@ __fastcall TPreferencesDlg::TPreferencesDlg( TComponent* Owner,
Icon
=
p_intf
->
p_sys
->
p_window
->
Icon
;
Icon
=
p_intf
->
p_sys
->
p_window
->
Icon
;
Application
->
HintHidePause
=
0x1000000
;
Application
->
HintHidePause
=
0x1000000
;
HintWindowClass
=
__classid
(
TNarrowHintWindow
);
HintWindowClass
=
__classid
(
TNarrowHintWindow
);
ModuleNames
=
new
TStringList
();
/* prevent the form from being resized horizontally */
/* prevent the form from being resized horizontally */
Constraints
->
MinWidth
=
Width
;
Constraints
->
MinWidth
=
Width
;
Constraints
->
MaxWidth
=
Width
;
Constraints
->
MaxWidth
=
Width
;
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
__fastcall
TPreferencesDlg
::~
TPreferencesDlg
()
{
delete
ModuleNames
;
}
//---------------------------------------------------------------------------
void
__fastcall
TPreferencesDlg
::
FormClose
(
TObject
*
Sender
,
void
__fastcall
TPreferencesDlg
::
FormClose
(
TObject
*
Sender
,
TCloseAction
&
Action
)
TCloseAction
&
Action
)
{
{
...
@@ -711,7 +689,8 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
...
@@ -711,7 +689,8 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
case
CONFIG_ITEM_MODULE
:
case
CONFIG_ITEM_MODULE
:
/* add new panel for the config option */
/* add new panel for the config option */
PanelPlugin
=
new
TPanelPlugin
(
this
,
p_item
,
p_intf
,
true
);
PanelPlugin
=
new
TPanelPlugin
(
this
,
p_item
,
p_intf
,
ModuleNames
,
true
);
PanelPlugin
->
Parent
=
ScrollBox
;
PanelPlugin
->
Parent
=
ScrollBox
;
/* Look for valid modules */
/* Look for valid modules */
...
@@ -730,9 +709,11 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
...
@@ -730,9 +709,11 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
else
else
ModuleDesc
=
AnsiString
(
p_parser
->
psz_object_name
);
ModuleDesc
=
AnsiString
(
p_parser
->
psz_object_name
);
PanelPlugin
->
CleanCheckListBox
->
Items
->
AddObject
(
// add a reference to the module name string
ModuleDesc
.
c_str
(),
// in the list item object
new
TObjectString
(
p_parser
->
psz_object_name
)
);
PanelPlugin
->
ExtCheckListBox
->
SetItemData
(
PanelPlugin
->
ExtCheckListBox
->
Items
->
Add
(
ModuleDesc
)
,
ModuleNames
->
Add
(
p_parser
->
psz_object_name
)
);
}
}
}
}
...
...
modules/gui/win32/preferences.h
View file @
f3563dc1
...
@@ -34,14 +34,18 @@
...
@@ -34,14 +34,18 @@
#include <ExtCtrls.hpp>
#include <ExtCtrls.hpp>
#include "CSPIN.h"
#include "CSPIN.h"
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
/* A TCheckListBox that automatically disposes any TObject
/* A TCheckListBox that can associate an integer to each string item */
associated with the string items */
class
TExtCheckListBox
:
public
TCheckListBox
class
TCleanCheckListBox
:
public
TCheckListBox
{
{
public:
public:
__fastcall
TCleanCheckListBox
(
Classes
::
TComponent
*
AOwner
)
DYNAMIC
void
__fastcall
SetItemData
(
int
Index
,
int
AData
)
{
TCheckListBox
::
SetItemData
(
Index
,
AData
);
}
DYNAMIC
int
__fastcall
GetItemData
(
int
Index
)
{
return
TCheckListBox
::
GetItemData
(
Index
);
}
__fastcall
TExtCheckListBox
(
Classes
::
TComponent
*
AOwner
)
:
TCheckListBox
(
AOwner
)
{};
:
TCheckListBox
(
AOwner
)
{};
virtual
__fastcall
~
TCleanCheckListBox
();
};
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
/* A THintWindow with a limited width */
/* A THintWindow with a limited width */
...
@@ -52,16 +56,6 @@ public:
...
@@ -52,16 +56,6 @@ public:
const
System
::
AnsiString
AHint
);
const
System
::
AnsiString
AHint
);
};
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
/* Just a wrapper to embed an AnsiString into a TObject */
class
TObjectString
:
public
TObject
{
private:
AnsiString
FString
;
public:
__fastcall
TObjectString
(
char
*
String
);
AnsiString
__fastcall
String
();
};
//---------------------------------------------------------------------------
class
TPanelPref
:
public
TPanel
class
TPanelPref
:
public
TPanel
{
{
public:
public:
...
@@ -71,7 +65,7 @@ public:
...
@@ -71,7 +65,7 @@ public:
protected:
protected:
module_config_t
*
p_config
;
module_config_t
*
p_config
;
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
T
CleanCheckListBox
*
__fastcall
CreateClean
CheckListBox
(
TWinControl
*
Parent
,
T
ExtCheckListBox
*
__fastcall
CreateExt
CheckListBox
(
TWinControl
*
Parent
,
int
Left
,
int
Width
,
int
Top
,
int
Height
);
int
Left
,
int
Width
,
int
Top
,
int
Height
);
TButton
*
__fastcall
CreateButton
(
TWinControl
*
Parent
,
TButton
*
__fastcall
CreateButton
(
TWinControl
*
Parent
,
int
Left
,
int
Width
,
int
Top
,
int
Height
,
AnsiString
Caption
);
int
Left
,
int
Width
,
int
Top
,
int
Height
,
AnsiString
Caption
);
...
@@ -89,16 +83,18 @@ protected:
...
@@ -89,16 +83,18 @@ protected:
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
class
TPanelPlugin
:
public
TPanelPref
class
TPanelPlugin
:
public
TPanelPref
{
{
module_t
*
ModuleSelected
;
public:
public:
__fastcall
TPanelPlugin
(
TComponent
*
Owner
,
module_config_t
*
p_config
,
__fastcall
TPanelPlugin
(
TComponent
*
Owner
,
module_config_t
*
p_config
,
intf_thread_t
*
_p_intf
,
bool
b_multi_plugins
);
intf_thread_t
*
_p_intf
,
TStringList
*
ModuleNames
,
bool
b_multi_plugins
);
bool
b_multi_plugins
;
bool
b_multi_plugins
;
T
CleanCheckListBox
*
Clean
CheckListBox
;
T
ExtCheckListBox
*
Ext
CheckListBox
;
TButton
*
ButtonConfig
;
TButton
*
ButtonConfig
;
TButton
*
ButtonUp
;
TButton
*
ButtonUp
;
TButton
*
ButtonDown
;
TButton
*
ButtonDown
;
TLabel
*
Label
;
TLabel
*
Label
;
module_t
*
ModuleSelected
;
TStringList
*
ModuleNames
;
virtual
void
__fastcall
TPanelPlugin
::
SetValue
(
AnsiString
Values
);
virtual
void
__fastcall
TPanelPlugin
::
SetValue
(
AnsiString
Values
);
virtual
void
__fastcall
UpdateChanges
();
virtual
void
__fastcall
UpdateChanges
();
void
__fastcall
CheckListBoxClick
(
TObject
*
Sender
);
void
__fastcall
CheckListBoxClick
(
TObject
*
Sender
);
...
@@ -162,8 +158,10 @@ __published: // IDE-managed Components
...
@@ -162,8 +158,10 @@ __published: // IDE-managed Components
void
__fastcall
FormClose
(
TObject
*
Sender
,
TCloseAction
&
Action
);
void
__fastcall
FormClose
(
TObject
*
Sender
,
TCloseAction
&
Action
);
private:
// User declarations
private:
// User declarations
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
TStringList
*
ModuleNames
;
public:
// User declarations
public:
// User declarations
__fastcall
TPreferencesDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
__fastcall
TPreferencesDlg
(
TComponent
*
Owner
,
intf_thread_t
*
_p_intf
);
virtual
__fastcall
~
TPreferencesDlg
();
void
__fastcall
CreateConfigDialog
(
char
*
psz_module_name
);
void
__fastcall
CreateConfigDialog
(
char
*
psz_module_name
);
};
};
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment