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 ...@@ -122,6 +122,7 @@ N: Boris Dor
E: babal@via.ecp.fr E: babal@via.ecp.fr
C: babal C: babal
D: Win32 network input D: Win32 network input
D: Win32 interface
S: France S: France
N: Jean-Marc Dressler N: Jean-Marc Dressler
......
This diff is collapsed.
object PreferencesDlg: TPreferencesDlg object PreferencesDlg: TPreferencesDlg
Left = 309 Left = 310
Top = 124 Top = 125
Width = 522 Width = 458
Height = 582 Height = 594
Anchors = [akTop, akRight]
Caption = 'Preferences' Caption = 'Preferences'
Color = clBtnFace Color = clBtnFace
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
...@@ -249,44 +250,50 @@ object PreferencesDlg: TPreferencesDlg ...@@ -249,44 +250,50 @@ object PreferencesDlg: TPreferencesDlg
object PageControlPref: TPageControl object PageControlPref: TPageControl
Left = 8 Left = 8
Top = 8 Top = 8
Width = 497 Width = 433
Height = 497 Height = 511
TabOrder = 1 Anchors = [akLeft, akTop, akRight, akBottom]
TabOrder = 0
end end
object ButtonApply: TButton object ButtonApply: TButton
Left = 146 Left = 266
Top = 520 Top = 530
Width = 105 Width = 82
Height = 25 Height = 25
Anchors = [akRight, akBottom]
Caption = 'Apply' Caption = 'Apply'
TabOrder = 0 TabOrder = 3
OnClick = ButtonApplyClick OnClick = ButtonApplyClick
end end
object ButtonSave: TButton object ButtonSave: TButton
Left = 265 Left = 359
Top = 520 Top = 530
Width = 105 Width = 82
Height = 25 Height = 25
Anchors = [akRight, akBottom]
Caption = 'Save' Caption = 'Save'
TabOrder = 2 TabOrder = 4
OnClick = ButtonSaveClick OnClick = ButtonSaveClick
end end
object ButtonOK: TButton object ButtonOK: TButton
Left = 26 Left = 81
Top = 520 Top = 530
Width = 105 Width = 82
Height = 25 Height = 25
Anchors = [akRight, akBottom]
Caption = 'OK' Caption = 'OK'
TabOrder = 3 Default = True
TabOrder = 1
OnClick = ButtonOkClick OnClick = ButtonOkClick
end end
object ButtonCancel: TButton object ButtonCancel: TButton
Left = 386 Left = 174
Top = 520 Top = 530
Width = 105 Width = 82
Height = 25 Height = 25
Anchors = [akRight, akBottom]
Caption = 'Cancel' Caption = 'Cancel'
TabOrder = 4 TabOrder = 2
OnClick = ButtonCancelClick OnClick = ButtonCancelClick
end end
end end
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* *
* Authors: Olivier Teuliere <ipkiss@via.ecp.fr> * 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 * 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 * it under the terms of the GNU General Public License as published by
...@@ -33,13 +34,41 @@ ...@@ -33,13 +34,41 @@
#include <ExtCtrls.hpp> #include <ExtCtrls.hpp>
#include "CSPIN.h" #include "CSPIN.h"
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class TGroupBoxPref : public TGroupBox /* A TCheckListBox that automatically disposes any TObject
associated with the string items */
class TCleanCheckListBox : public TCheckListBox
{ {
public: 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; module_config_t *p_config;
virtual void __fastcall UpdateChanges(); virtual void __fastcall UpdateChanges();
TCheckListBox * __fastcall CreateCheckListBox( TWinControl *Parent, TCleanCheckListBox * __fastcall CreateCleanCheckListBox( 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 );
...@@ -55,14 +84,13 @@ public: ...@@ -55,14 +84,13 @@ public:
long Min, long Max, long Value ); long Min, long Max, long Value );
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class TGroupBoxPlugin : public TGroupBoxPref class TPanelPlugin : public TPanelPref
{ {
public: public:
__fastcall TGroupBoxPlugin( TComponent* Owner, module_config_t *p_config ); __fastcall TPanelPlugin( TComponent* Owner, module_config_t *p_config );
TCheckListBox *CheckListBox; TCleanCheckListBox *CleanCheckListBox;
TButton *ButtonConfig; TButton *ButtonConfig;
TLabel *LabelDesc; TLabel *Label;
TLabel *LabelHint;
module_t *ModuleSelected; module_t *ModuleSelected;
void __fastcall UpdateChanges(); void __fastcall UpdateChanges();
void __fastcall CheckListBoxClick( TObject *Sender ); void __fastcall CheckListBoxClick( TObject *Sender );
...@@ -70,29 +98,28 @@ public: ...@@ -70,29 +98,28 @@ public:
void __fastcall ButtonConfigClick( TObject *Sender ); void __fastcall ButtonConfigClick( TObject *Sender );
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class TGroupBoxString : public TGroupBoxPref class TPanelString : public TPanelPref
{ {
public: public:
__fastcall TGroupBoxString( TComponent* Owner, module_config_t *p_config ); __fastcall TPanelString( TComponent* Owner, module_config_t *p_config );
TLabel *LabelDesc; TLabel *Label;
TEdit *Edit; TEdit *Edit;
void __fastcall UpdateChanges(); void __fastcall UpdateChanges();
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class TGroupBoxInteger : public TGroupBoxPref class TPanelInteger : public TPanelPref
{ {
public: public:
__fastcall TGroupBoxInteger( TComponent* Owner, module_config_t *p_config ); __fastcall TPanelInteger( TComponent* Owner, module_config_t *p_config );
TLabel *LabelDesc; TLabel *Label;
TCSpinEdit *SpinEdit; TCSpinEdit *SpinEdit;
void __fastcall UpdateChanges(); void __fastcall UpdateChanges();
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
class TGroupBoxBool : public TGroupBoxPref class TPanelBool : public TPanelPref
{ {
public: public:
__fastcall TGroupBoxBool( TComponent* Owner, module_config_t *p_config ); __fastcall TPanelBool( TComponent* Owner, module_config_t *p_config );
TLabel *LabelDesc;
TCheckBox *CheckBox; TCheckBox *CheckBox;
void __fastcall UpdateChanges(); 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