Commit 81ddbebd authored by Boris Dorès's avatar Boris Dorès

- Enterely new layout for the preference window of the native win32

  interface, in order to improve its clarity (the dialog box is now even
  a bit smaller) and to get closer to Windows standards.
  (second part of the job, and hopefully the last for now, begun with
  Ipkiss a few days ago by using CheckListBoxes)

  Still need some work to get the interface compatible with Windows XP
  skins.
parent 4c9f2398
......@@ -122,6 +122,7 @@ N: Boris Dor
E: babal@via.ecp.fr
C: babal
D: Win32 network input
D: Win32 interface
S: France
N: Jean-Marc Dressler
......
This diff is collapsed.
object PreferencesDlg: TPreferencesDlg
Left = 309
Top = 124
Width = 522
Height = 582
Left = 310
Top = 125
Width = 458
Height = 594
Anchors = [akTop, akRight]
Caption = 'Preferences'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
......@@ -249,44 +250,50 @@ object PreferencesDlg: TPreferencesDlg
object PageControlPref: TPageControl
Left = 8
Top = 8
Width = 497
Height = 497
TabOrder = 1
Width = 433
Height = 511
Anchors = [akLeft, akTop, akRight, akBottom]
TabOrder = 0
end
object ButtonApply: TButton
Left = 146
Top = 520
Width = 105
Left = 266
Top = 530
Width = 82
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Apply'
TabOrder = 0
TabOrder = 3
OnClick = ButtonApplyClick
end
object ButtonSave: TButton
Left = 265
Top = 520
Width = 105
Left = 359
Top = 530
Width = 82
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Save'
TabOrder = 2
TabOrder = 4
OnClick = ButtonSaveClick
end
object ButtonOK: TButton
Left = 26
Top = 520
Width = 105
Left = 81
Top = 530
Width = 82
Height = 25
Anchors = [akRight, akBottom]
Caption = 'OK'
TabOrder = 3
Default = True
TabOrder = 1
OnClick = ButtonOkClick
end
object ButtonCancel: TButton
Left = 386
Top = 520
Width = 105
Left = 174
Top = 530
Width = 82
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Cancel'
TabOrder = 4
TabOrder = 2
OnClick = ButtonCancelClick
end
end
......@@ -4,6 +4,7 @@
* Copyright (C) 2002 VideoLAN
*
* Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
* Boris Dores <babal@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -33,13 +34,41 @@
#include <ExtCtrls.hpp>
#include "CSPIN.h"
//---------------------------------------------------------------------------
class TGroupBoxPref : public TGroupBox
/* A TCheckListBox that automatically disposes any TObject
associated with the string items */
class TCleanCheckListBox : public TCheckListBox
{
public:
__fastcall TGroupBoxPref( TComponent* Owner, module_config_t *p_config_arg );
__fastcall TCleanCheckListBox(Classes::TComponent* AOwner)
: TCheckListBox( AOwner ) { };
virtual __fastcall ~TCleanCheckListBox();
};
//---------------------------------------------------------------------------
/* A THintWindow with a limited width */
class TNarrowHintWindow : public THintWindow
{
public:
virtual void __fastcall ActivateHint(const Windows::TRect &Rect,
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
{
public:
__fastcall TPanelPref( TComponent* Owner, module_config_t *p_config_arg );
module_config_t *p_config;
virtual void __fastcall UpdateChanges();
TCheckListBox * __fastcall CreateCheckListBox( TWinControl *Parent,
TCleanCheckListBox * __fastcall CreateCleanCheckListBox( TWinControl *Parent,
int Left, int Width, int Top, int Height );
TButton * __fastcall CreateButton( TWinControl *Parent,
int Left, int Width, int Top, int Height, AnsiString Caption );
......@@ -55,14 +84,13 @@ public:
long Min, long Max, long Value );
};
//---------------------------------------------------------------------------
class TGroupBoxPlugin : public TGroupBoxPref
class TPanelPlugin : public TPanelPref
{
public:
__fastcall TGroupBoxPlugin( TComponent* Owner, module_config_t *p_config );
TCheckListBox *CheckListBox;
__fastcall TPanelPlugin( TComponent* Owner, module_config_t *p_config );
TCleanCheckListBox *CleanCheckListBox;
TButton *ButtonConfig;
TLabel *LabelDesc;
TLabel *LabelHint;
TLabel *Label;
module_t *ModuleSelected;
void __fastcall UpdateChanges();
void __fastcall CheckListBoxClick( TObject *Sender );
......@@ -70,29 +98,28 @@ public:
void __fastcall ButtonConfigClick( TObject *Sender );
};
//---------------------------------------------------------------------------
class TGroupBoxString : public TGroupBoxPref
class TPanelString : public TPanelPref
{
public:
__fastcall TGroupBoxString( TComponent* Owner, module_config_t *p_config );
TLabel *LabelDesc;
__fastcall TPanelString( TComponent* Owner, module_config_t *p_config );
TLabel *Label;
TEdit *Edit;
void __fastcall UpdateChanges();
};
//---------------------------------------------------------------------------
class TGroupBoxInteger : public TGroupBoxPref
class TPanelInteger : public TPanelPref
{
public:
__fastcall TGroupBoxInteger( TComponent* Owner, module_config_t *p_config );
TLabel *LabelDesc;
__fastcall TPanelInteger( TComponent* Owner, module_config_t *p_config );
TLabel *Label;
TCSpinEdit *SpinEdit;
void __fastcall UpdateChanges();
};
//---------------------------------------------------------------------------
class TGroupBoxBool : public TGroupBoxPref
class TPanelBool : public TPanelPref
{
public:
__fastcall TGroupBoxBool( TComponent* Owner, module_config_t *p_config );
TLabel *LabelDesc;
__fastcall TPanelBool( TComponent* Owner, module_config_t *p_config );
TCheckBox *CheckBox;
void __fastcall UpdateChanges();
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment