* Copyright (C) 2002 VideoLAN\r
*\r
* Authors: Olivier Teuliere <ipkiss@via.ecp.fr>\r
+ * Boris Dores <babal@via.ecp.fr>\r
*\r
* This program is free software; you can redistribute it and/or modify\r
* it under the terms of the GNU General Public License as published by\r
\r
extern intf_thread_t *p_intfGlobal;\r
\r
+/****************************************************************************\r
+ * A THintWindow with a limited width\r
+ ****************************************************************************/\r
+void __fastcall TNarrowHintWindow::ActivateHint(const Windows::TRect &Rect,\r
+ const System::AnsiString AHint)\r
+{\r
+ TRect NarrowRect = CalcHintRect ( 300 , AHint , NULL );\r
+ NarrowRect.Left = Rect.Left;\r
+ NarrowRect.Top = Rect.Top;\r
+ NarrowRect.Right += Rect.Left;\r
+ NarrowRect.Bottom += Rect.Top;\r
+ THintWindow::ActivateHint ( NarrowRect , AHint );\r
+}\r
+\r
+\r
+/****************************************************************************\r
+ * Just a wrapper to embed an AnsiString into a TObject\r
+ ****************************************************************************/\r
+__fastcall TObjectString::TObjectString(char * String)\r
+{\r
+ FString = AnsiString(String);\r
+}\r
+//---------------------------------------------------------------------------\r
+AnsiString __fastcall TObjectString::String()\r
+{\r
+ return FString;\r
+}\r
+\r
+\r
+/****************************************************************************\r
+ * A TCheckListBox that automatically disposes any TObject\r
+ * associated with the string items\r
+ ****************************************************************************/\r
+__fastcall TCleanCheckListBox::~TCleanCheckListBox()\r
+{\r
+ for ( int i = 0 ; i < Items->Count ; i++ )\r
+ {\r
+ if ( Items->Objects[i] != NULL ) delete Items->Objects[i];\r
+ }\r
+}\r
+\r
\r
/****************************************************************************\r
* Functions to help components creation\r
****************************************************************************/\r
-__fastcall TGroupBoxPref::TGroupBoxPref( TComponent* Owner,\r
- module_config_t *p_config_arg ) : TGroupBox( Owner )\r
+__fastcall TPanelPref::TPanelPref( TComponent* Owner,\r
+ module_config_t *p_config_arg ) : TPanel( Owner )\r
{\r
p_config = p_config_arg;\r
- Caption = p_config->psz_text;\r
+ BevelInner = bvNone;\r
+ BevelOuter = bvNone;\r
+ BorderStyle = bsNone;\r
}\r
//---------------------------------------------------------------------------\r
-TCheckListBox * __fastcall TGroupBoxPref::CreateCheckListBox(\r
+TCleanCheckListBox * __fastcall TPanelPref::CreateCleanCheckListBox(\r
TWinControl *Parent, int Left, int Width, int Top, int Height )\r
{\r
- TCheckListBox *CheckListBox = new TCheckListBox( Parent );\r
- CheckListBox->Parent = Parent;\r
- CheckListBox->Left = Left;\r
- CheckListBox->Width = Width;\r
- CheckListBox->Top = Top;\r
- CheckListBox->Height = Height;\r
- return CheckListBox;\r
+ TCleanCheckListBox *CleanCheckListBox = new TCleanCheckListBox( Parent );\r
+ CleanCheckListBox->Parent = Parent;\r
+ CleanCheckListBox->Left = Left;\r
+ CleanCheckListBox->Width = Width;\r
+ CleanCheckListBox->Top = Top;\r
+ CleanCheckListBox->Height = Height;\r
+ return CleanCheckListBox;\r
}\r
//---------------------------------------------------------------------------\r
-TButton * __fastcall TGroupBoxPref::CreateButton( TWinControl *Parent,\r
+TButton * __fastcall TPanelPref::CreateButton( TWinControl *Parent,\r
int Left, int Width, int Top, int Height, AnsiString Caption )\r
{\r
TButton *Button = new TButton( Parent );\r
return Button;\r
}\r
//---------------------------------------------------------------------------\r
-TCheckBox * __fastcall TGroupBoxPref::CreateCheckBox( TWinControl *Parent,\r
+TCheckBox * __fastcall TPanelPref::CreateCheckBox( TWinControl *Parent,\r
int Left, int Width, int Top, int Height, AnsiString Caption )\r
{\r
TCheckBox *CheckBox = new TCheckBox( Parent );\r
return CheckBox;\r
}\r
//---------------------------------------------------------------------------\r
-TLabel * __fastcall TGroupBoxPref::CreateLabel( TWinControl *Parent,\r
+TLabel * __fastcall TPanelPref::CreateLabel( TWinControl *Parent,\r
int Left, int Width, int Top, int Height, AnsiString Caption,\r
bool WordWrap )\r
{\r
return Label;\r
}\r
//---------------------------------------------------------------------------\r
-TEdit * __fastcall TGroupBoxPref::CreateEdit( TWinControl *Parent,\r
+TEdit * __fastcall TPanelPref::CreateEdit( TWinControl *Parent,\r
int Left, int Width, int Top, int Height, AnsiString Text )\r
{\r
TEdit *Edit = new TEdit( Parent );\r
return Edit;\r
}\r
//---------------------------------------------------------------------------\r
-TCSpinEdit * __fastcall TGroupBoxPref::CreateSpinEdit( TWinControl *Parent,\r
+TCSpinEdit * __fastcall TPanelPref::CreateSpinEdit( TWinControl *Parent,\r
int Left, int Width, int Top, int Height,\r
long Min, long Max, long Value )\r
{\r
return SpinEdit;\r
}\r
//---------------------------------------------------------------------------\r
-void __fastcall TGroupBoxPref::UpdateChanges()\r
+void __fastcall TPanelPref::UpdateChanges()\r
{\r
}\r
\r
+#define LIBWIN32_PREFSIZE_VPAD 4\r
+#define LIBWIN32_PREFSIZE_HPAD 4\r
+#define LIBWIN32_PREFSIZE_LEFT 16\r
+#define LIBWIN32_PREFSIZE_EDIT_LEFT (LIBWIN32_PREFSIZE_LEFT+32)\r
+#define LIBWIN32_PREFSIZE_WIDTH 375\r
+#define LIBWIN32_PREFSIZE_EDIT_WIDTH (LIBWIN32_PREFSIZE_WIDTH-32)\r
+#define LIBWIN32_PREFSIZE_BUTTON_WIDTH 150\r
+#define LIBWIN32_PREFSIZE_SPINEDIT_WIDTH 100\r
+#define LIBWIN32_PREFSIZE_RIGHT (LIBWIN32_PREFSIZE_LEFT+LIBWIN32_PREFSIZE_WIDTH)\r
+#define LIBWIN32_PREFSIZE_BUTTON_HEIGHT 25\r
+#define LIBWIN32_PREFSIZE_LABEL_HEIGHT 26\r
+#define LIBWIN32_PREFSIZE_CHECKLISTBOX_HEIGHT 120\r
+#define LIBWIN32_PREFSIZE_EDIT_HEIGHT 21\r
+#define LIBWIN32_PREFSIZE_CHECKBOX_HEIGHT 17\r
+#define LIBWIN32_PREFSIZE_SPINEDIT_HEIGHT 21\r
\r
/****************************************************************************\r
- * GroupBox for module management\r
+ * Panel for module management\r
****************************************************************************/\r
-__fastcall TGroupBoxPlugin::TGroupBoxPlugin( TComponent* Owner,\r
- module_config_t *p_config ) : TGroupBoxPref( Owner, p_config )\r
+__fastcall TPanelPlugin::TPanelPlugin( TComponent* Owner,\r
+ module_config_t *p_config ) : TPanelPref( Owner, p_config )\r
{\r
- /* init checklistbox */\r
- CheckListBox = CreateCheckListBox( this, 16, 164, 24, 160 );\r
- CheckListBox->OnClick = CheckListBoxClick;\r
- CheckListBox->OnClickCheck = CheckListBoxClickCheck;\r
-\r
- /* init description label */\r
- LabelDesc = CreateLabel( this, 230, 225, 50, 52,\r
- p_config->psz_longtext, true );\r
-\r
- /* init hint label */\r
- LabelHint = CreateLabel( this, 230, 225, 135, 13, "", false );\r
-\r
/* init configure button */\r
- ButtonConfig = CreateButton( this, 16, 70, 192, 25, "Configure" );\r
+ ButtonConfig = CreateButton( this,\r
+ LIBWIN32_PREFSIZE_RIGHT - LIBWIN32_PREFSIZE_BUTTON_WIDTH,\r
+ LIBWIN32_PREFSIZE_BUTTON_WIDTH,\r
+ LIBWIN32_PREFSIZE_VPAD,\r
+ LIBWIN32_PREFSIZE_BUTTON_HEIGHT,\r
+ "Configure..." );\r
ButtonConfig->Enabled = false;\r
ButtonConfig->OnClick = ButtonConfigClick;\r
\r
- Height = 233;\r
+ /* init label */\r
+ AnsiString Text = AnsiString(p_config->psz_text) + ":";\r
+ Label = CreateLabel( this,\r
+ LIBWIN32_PREFSIZE_LEFT,\r
+ LIBWIN32_PREFSIZE_RIGHT - LIBWIN32_PREFSIZE_BUTTON_WIDTH\r
+ - LIBWIN32_PREFSIZE_HPAD,\r
+ LIBWIN32_PREFSIZE_VPAD,\r
+ LIBWIN32_PREFSIZE_LABEL_HEIGHT,\r
+ Text.c_str(), true );\r
+\r
+ /* vertical alignement */\r
+ if ( ButtonConfig->Height > Label->Height )\r
+ Label->Top += ( ButtonConfig->Height - Label->Height ) / 2;\r
+ else\r
+ ButtonConfig->Top += ( Label->Height - ButtonConfig->Height ) / 2;\r
+\r
+ /* init checklistbox */\r
+ CleanCheckListBox = CreateCleanCheckListBox( this,\r
+ LIBWIN32_PREFSIZE_EDIT_LEFT,\r
+ LIBWIN32_PREFSIZE_EDIT_WIDTH,\r
+ max ( Label->Top + Label->Height , ButtonConfig->Top\r
+ + ButtonConfig->Height ) + LIBWIN32_PREFSIZE_VPAD,\r
+ LIBWIN32_PREFSIZE_CHECKLISTBOX_HEIGHT );\r
+ CleanCheckListBox->OnClick = CheckListBoxClick;\r
+ CleanCheckListBox->OnClickCheck = CheckListBoxClickCheck;\r
+ CleanCheckListBox->Hint = p_config->psz_longtext;\r
+ CleanCheckListBox->ShowHint = true;\r
+\r
+ /* panel height */\r
+ Height = CleanCheckListBox->Top + CleanCheckListBox->Height\r
+ + LIBWIN32_PREFSIZE_VPAD;\r
};\r
//---------------------------------------------------------------------------\r
-void __fastcall TGroupBoxPlugin::CheckListBoxClick( TObject *Sender )\r
+void __fastcall TPanelPlugin::CheckListBoxClick( TObject *Sender )\r
{\r
module_t **pp_parser;\r
vlc_list_t *p_list;\r
\r
/* check that the click is valid (we are on an item, and the click\r
* started on an item */\r
- if( CheckListBox->ItemIndex == -1 )\r
+ if( CleanCheckListBox->ItemIndex == -1 )\r
return;\r
\r
- AnsiString Name = CheckListBox->Items->Strings[CheckListBox->ItemIndex];\r
+ AnsiString Name = ((TObjectString*)CleanCheckListBox->Items->\r
+ Objects[CleanCheckListBox->ItemIndex])->String().c_str();\r
if( Name == "" )\r
return;\r
\r
if( strcmp( (*pp_parser)->psz_object_name, Name.c_str() ) == 0 )\r
{\r
ModuleSelected = (*pp_parser);\r
- LabelHint->Caption = (*pp_parser)->psz_longname ?\r
- (*pp_parser)->psz_longname : "";\r
ButtonConfig->Enabled =\r
(*pp_parser)->i_config_items ? true : false;\r
\r
}\r
}\r
//---------------------------------------------------------------------------\r
-void __fastcall TGroupBoxPlugin::CheckListBoxClickCheck( TObject *Sender )\r
+void __fastcall TPanelPlugin::CheckListBoxClickCheck( TObject *Sender )\r
{\r
/* one item maximum must be checked */\r
- if( CheckListBox->Checked[CheckListBox->ItemIndex] )\r
+ if( CleanCheckListBox->Checked[CleanCheckListBox->ItemIndex] )\r
{\r
- for( int item = 0; item < CheckListBox->Items->Count; item++ )\r
+ for( int item = 0; item < CleanCheckListBox->Items->Count; item++ )\r
{\r
- if( item != CheckListBox->ItemIndex )\r
+ if( item != CleanCheckListBox->ItemIndex )\r
{\r
- CheckListBox->Checked[item] = false;\r
+ CleanCheckListBox->Checked[item] = false;\r
}\r
}\r
}\r
}\r
//---------------------------------------------------------------------------\r
-void __fastcall TGroupBoxPlugin::ButtonConfigClick( TObject *Sender )\r
+void __fastcall TPanelPlugin::ButtonConfigClick( TObject *Sender )\r
{\r
p_intfGlobal->p_sys->p_window->\r
CreatePreferences( ModuleSelected->psz_object_name );\r
}\r
//---------------------------------------------------------------------------\r
-void __fastcall TGroupBoxPlugin::UpdateChanges()\r
+void __fastcall TPanelPlugin::UpdateChanges()\r
{\r
AnsiString Name = "";\r
\r
/* find the selected plugin (if any) */\r
- for( int item = 0; item < CheckListBox->Items->Count; item++ )\r
+ for( int item = 0; item < CleanCheckListBox->Items->Count; item++ )\r
{\r
- if( CheckListBox->Checked[item] )\r
+ if( CleanCheckListBox->Checked[item] )\r
{\r
- Name = CheckListBox->Items->Strings[item];\r
+ Name = ((TObjectString*)CleanCheckListBox->Items->Objects[item])\r
+ ->String().c_str();\r
break;\r
}\r
}\r
\r
\r
/****************************************************************************\r
- * GroupBox for string management\r
+ * Panel for string management\r
****************************************************************************/\r
-__fastcall TGroupBoxString::TGroupBoxString( TComponent* Owner,\r
- module_config_t *p_config ) : TGroupBoxPref( Owner, p_config )\r
+__fastcall TPanelString::TPanelString( TComponent* Owner,\r
+ module_config_t *p_config ) : TPanelPref( Owner, p_config )\r
{\r
/* init description label */\r
- LabelDesc = CreateLabel( this, 230, 225, 24, 26,\r
- p_config->psz_longtext, true );\r
+ AnsiString Text = AnsiString ( p_config->psz_text ) + ":";\r
+ Label = CreateLabel( this,\r
+ LIBWIN32_PREFSIZE_LEFT,\r
+ LIBWIN32_PREFSIZE_WIDTH,\r
+ LIBWIN32_PREFSIZE_VPAD,\r
+ LIBWIN32_PREFSIZE_LABEL_HEIGHT,\r
+ Text.c_str(), true );\r
\r
/* init edit */\r
- Edit = CreateEdit( this, 16, 164, 24, 21, "" );\r
+ Edit = CreateEdit( this,\r
+ LIBWIN32_PREFSIZE_EDIT_LEFT,\r
+ LIBWIN32_PREFSIZE_EDIT_WIDTH,\r
+ LIBWIN32_PREFSIZE_VPAD + Label->Height + LIBWIN32_PREFSIZE_VPAD,\r
+ LIBWIN32_PREFSIZE_EDIT_HEIGHT, "" );\r
vlc_mutex_lock( p_config->p_lock );\r
Edit->Text = p_config->psz_value ? p_config->psz_value : "";\r
vlc_mutex_unlock( p_config->p_lock );\r
+ Edit->Hint = p_config->psz_longtext;\r
+ Edit->ShowHint = true;\r
\r
- /* vertical alignment */\r
- Height = LabelDesc->Height + 24;\r
- LabelDesc->Top = Top + ( Height - LabelDesc->Height ) / 2 + 4;\r
- Edit->Top = Top + ( Height - Edit->Height ) / 2 + 4;\r
+ /* panel height */\r
+ Height = LIBWIN32_PREFSIZE_VPAD + Label->Height + LIBWIN32_PREFSIZE_VPAD\r
+ + Edit->Height + LIBWIN32_PREFSIZE_VPAD;\r
};\r
//---------------------------------------------------------------------------\r
-void __fastcall TGroupBoxString::UpdateChanges()\r
+void __fastcall TPanelString::UpdateChanges()\r
{\r
/* XXX: Necessary, since c_str() returns only a temporary pointer... */\r
free( p_config->psz_value );\r
\r
\r
/****************************************************************************\r
- * GroupBox for integer management\r
+ * Panel for integer management\r
****************************************************************************/\r
-__fastcall TGroupBoxInteger::TGroupBoxInteger( TComponent* Owner,\r
- module_config_t *p_config ) : TGroupBoxPref( Owner, p_config )\r
+__fastcall TPanelInteger::TPanelInteger( TComponent* Owner,\r
+ module_config_t *p_config ) : TPanelPref( Owner, p_config )\r
{\r
/* init description label */\r
- LabelDesc = CreateLabel( this, 230, 225, 19, 26,\r
- p_config->psz_longtext, true );\r
+ AnsiString Text = AnsiString ( p_config->psz_text ) + ":";\r
+ Label = CreateLabel( this,\r
+ LIBWIN32_PREFSIZE_LEFT,\r
+ LIBWIN32_PREFSIZE_WIDTH - LIBWIN32_PREFSIZE_SPINEDIT_WIDTH\r
+ - LIBWIN32_PREFSIZE_HPAD,\r
+ LIBWIN32_PREFSIZE_VPAD,\r
+ LIBWIN32_PREFSIZE_LABEL_HEIGHT, Text.c_str(), true );\r
\r
/* init spinedit */\r
- SpinEdit = CreateSpinEdit( this, 16, 164, 24, 21,\r
- -1, 100000, p_config->i_value );\r
-\r
- /* vertical alignment */\r
- Height = LabelDesc->Height + 24;\r
- LabelDesc->Top = Top + ( Height - LabelDesc->Height ) / 2 + 4;\r
- SpinEdit->Top = Top + ( Height - SpinEdit->Height ) / 2 + 4;\r
+ SpinEdit = CreateSpinEdit( this,\r
+ LIBWIN32_PREFSIZE_RIGHT - LIBWIN32_PREFSIZE_SPINEDIT_WIDTH,\r
+ LIBWIN32_PREFSIZE_SPINEDIT_WIDTH,\r
+ LIBWIN32_PREFSIZE_VPAD,\r
+ LIBWIN32_PREFSIZE_SPINEDIT_HEIGHT,\r
+ -1, 100000, p_config->i_value );\r
+ SpinEdit->Hint = p_config->psz_longtext;\r
+ SpinEdit->ShowHint = true;\r
+\r
+ /* vertical alignement and panel height */\r
+ if ( SpinEdit->Height > Label->Height )\r
+ {\r
+ Label->Top += ( SpinEdit->Height - Label->Height ) / 2;\r
+ Height = SpinEdit->Top + SpinEdit->Height + LIBWIN32_PREFSIZE_VPAD;\r
+ }\r
+ else\r
+ {\r
+ SpinEdit->Top += ( Label->Height - SpinEdit->Height ) / 2;\r
+ Height = Label->Top + Label->Height + LIBWIN32_PREFSIZE_VPAD;\r
+ }\r
};\r
//---------------------------------------------------------------------------\r
-void __fastcall TGroupBoxInteger::UpdateChanges()\r
+void __fastcall TPanelInteger::UpdateChanges()\r
{\r
/* Warning: we're casting from long to int */\r
p_config->i_value = (int)SpinEdit->Value;\r
\r
\r
/****************************************************************************\r
- * GroupBox for boolean management\r
+ * Panel for boolean management\r
****************************************************************************/\r
-__fastcall TGroupBoxBool::TGroupBoxBool( TComponent* Owner,\r
- module_config_t *p_config ) : TGroupBoxPref( Owner, p_config )\r
+__fastcall TPanelBool::TPanelBool( TComponent* Owner,\r
+ module_config_t *p_config ) : TPanelPref( Owner, p_config )\r
{\r
- /* init description label */\r
- LabelDesc = CreateLabel( this, 230, 225, 19, 26,\r
- p_config->psz_longtext, true );\r
-\r
/* init checkbox */\r
- CheckBox = CreateCheckBox( this, 16, 184, 28, 17, p_config->psz_text );\r
+ CheckBox = CreateCheckBox( this,\r
+ LIBWIN32_PREFSIZE_LEFT,\r
+ LIBWIN32_PREFSIZE_WIDTH,\r
+ LIBWIN32_PREFSIZE_VPAD,\r
+ LIBWIN32_PREFSIZE_CHECKBOX_HEIGHT, p_config->psz_text );\r
CheckBox->Checked = p_config->i_value;\r
+ CheckBox->Hint = p_config->psz_longtext;\r
+ CheckBox->ShowHint = true;\r
\r
- /* vertical alignment */\r
- Height = LabelDesc->Height + 24;\r
- LabelDesc->Top = Top + ( Height - LabelDesc->Height ) / 2 + 4;\r
- CheckBox->Top = Top + ( Height - CheckBox->Height ) / 2 + 4;\r
+ /* panel height */\r
+ Height = LIBWIN32_PREFSIZE_VPAD + CheckBox->Height + LIBWIN32_PREFSIZE_VPAD;\r
};\r
//---------------------------------------------------------------------------\r
-void __fastcall TGroupBoxBool::UpdateChanges()\r
+void __fastcall TPanelBool::UpdateChanges()\r
{\r
p_config->i_value = CheckBox->Checked ? 1 : 0;\r
}\r
: TForm( Owner )\r
{\r
Icon = p_intfGlobal->p_sys->p_window->Icon;\r
+ Application->HintHidePause = 0x1000000;\r
+ HintWindowClass = __classid ( TNarrowHintWindow );\r
+ /* prevent the form from being resized horizontally */\r
+ Constraints->MinWidth = Width;\r
+ Constraints->MaxWidth = Width;\r
}\r
//---------------------------------------------------------------------------\r
void __fastcall TPreferencesDlg::FormClose( TObject *Sender,\r
TTabSheet *TabSheet;\r
TScrollBox *ScrollBox;\r
TPanel *Panel;\r
- TGroupBoxPlugin *GroupBoxPlugin;\r
- TGroupBoxString *GroupBoxString;\r
- TGroupBoxInteger *GroupBoxInteger;\r
- TGroupBoxBool *GroupBoxBool;\r
+ TPanelPlugin *PanelPlugin;\r
+ TPanelString *PanelString;\r
+ TPanelInteger *PanelInteger;\r
+ TPanelBool *PanelBool;\r
\r
/* Look for the selected module */\r
p_list = vlc_list_find( p_intfGlobal, VLC_OBJECT_MODULE, FIND_ANYWHERE );\r
ScrollBox->HorzScrollBar->Tracking = true;\r
ScrollBox->VertScrollBar->Tracking = true;\r
\r
+ /* add a panel as top margin */\r
+ ADD_PANEL;\r
+\r
break;\r
\r
case CONFIG_ITEM_MODULE:\r
\r
- /* add new groupbox for the config option */\r
- GroupBoxPlugin = new TGroupBoxPlugin( this, p_item );\r
- GroupBoxPlugin->Parent = ScrollBox;\r
-\r
- /* add panel as separator */\r
- ADD_PANEL;\r
+ /* add new panel for the config option */\r
+ PanelPlugin = new TPanelPlugin( this, p_item );\r
+ PanelPlugin->Parent = ScrollBox;\r
\r
/* Look for valid modules */\r
pp_parser = (module_t **)p_list->pp_objects;\r
{\r
if( !strcmp( (*pp_parser)->psz_capability, p_item->psz_type ) )\r
{\r
- int item = GroupBoxPlugin->CheckListBox->Items->Add(\r
- (*pp_parser)->psz_object_name );\r
+ AnsiString ModuleDesc;\r
+ if ( (*pp_parser)->psz_longname != NULL ) {\r
+ ModuleDesc = AnsiString((*pp_parser)->psz_longname) +\r
+ " (" + AnsiString((*pp_parser)->psz_object_name) +\r
+ ")";\r
+ }\r
+ else\r
+ ModuleDesc = AnsiString((*pp_parser)->psz_object_name);\r
+\r
+ int item = PanelPlugin->CleanCheckListBox->Items->AddObject(\r
+ ModuleDesc.c_str(),\r
+ new TObjectString((*pp_parser)->psz_object_name) );\r
\r
/* check the box if it's the default module */\r
AnsiString Name = p_item->psz_value ?\r
p_item->psz_value : "";\r
if( !strcmp( (*pp_parser)->psz_object_name, Name.c_str()) )\r
{\r
- GroupBoxPlugin->CheckListBox->Checked[item] = true;\r
+ PanelPlugin->CleanCheckListBox->Checked[item] = true;\r
}\r
}\r
}\r
\r
case CONFIG_ITEM_STRING:\r
\r
- /* add new groupbox for the config option */\r
- GroupBoxString = new TGroupBoxString( this, p_item );\r
- GroupBoxString->Parent = ScrollBox;\r
-\r
- /* add panel as separator */\r
- ADD_PANEL;\r
+ /* add new panel for the config option */\r
+ PanelString = new TPanelString( this, p_item );\r
+ PanelString->Parent = ScrollBox;\r
\r
break;\r
\r
case CONFIG_ITEM_INTEGER:\r
\r
- /* add new groupbox for the config option */\r
- GroupBoxInteger = new TGroupBoxInteger( this, p_item );\r
- GroupBoxInteger->Parent = ScrollBox;\r
-\r
- /* add panel as separator */\r
- ADD_PANEL;\r
+ /* add new panel for the config option */\r
+ PanelInteger = new TPanelInteger( this, p_item );\r
+ PanelInteger->Parent = ScrollBox;\r
\r
break;\r
\r
case CONFIG_ITEM_BOOL:\r
\r
- /* add new groupbox for the config option */\r
- GroupBoxBool = new TGroupBoxBool( this, p_item );\r
- GroupBoxBool->Parent = ScrollBox;\r
-\r
- /* add panel as separator */\r
- ADD_PANEL;\r
+ /* add new panel for the config option */\r
+ PanelBool = new TPanelBool( this, p_item );\r
+ PanelBool->Parent = ScrollBox;\r
\r
break;\r
}\r
}\r
while( p_item->i_type != CONFIG_HINT_END );\r
\r
- /* Reorder groupboxes inside the tabsheets */\r
+ /* Reorder panels inside the tabsheets */\r
for( i_pages = 0; i_pages < PageControlPref->PageCount; i_pages++ )\r
{\r
/* get scrollbox from the tabsheet */\r
ScrollBox = (TScrollBox *)PageControlPref->Pages[i_pages]->Controls[0];\r
\r
+ /* add a panel as bottom margin */\r
+ ADD_PANEL;\r
+\r
for( i_ctrl = ScrollBox->ControlCount - 1; i_ctrl >= 0 ; i_ctrl-- )\r
{\r
ScrollBox->Controls[i_ctrl]->Align = alTop;\r
void __fastcall TPreferencesDlg::ButtonApplyClick( TObject *Sender )\r
{\r
TScrollBox *ScrollBox;\r
- TGroupBoxPref *GroupBox;\r
+ TPanelPref *Panel;\r
int i, j;\r
\r
for( i = 0; i < PageControlPref->PageCount; i++ )\r
for( j = 0; j < ScrollBox->ControlCount ; j++ )\r
{\r
/* skip the panels */\r
- if( ScrollBox->Controls[j]->InheritsFrom( __classid( TGroupBoxPref ) ) )\r
+ if( ScrollBox->Controls[j]->InheritsFrom( __classid( TPanelPref ) ) )\r
{\r
- GroupBox = (TGroupBoxPref *)ScrollBox->Controls[j];\r
- GroupBox->UpdateChanges();\r
- SaveValue( GroupBox->p_config );\r
+ Panel = (TPanelPref *)ScrollBox->Controls[j];\r
+ Panel->UpdateChanges();\r
+ SaveValue( Panel->p_config );\r
}\r
}\r
}\r