The Winamp Remote Control suite
a remote control client and plugin for Winamp 2.x, 5.x
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
SettingsF.cpp
Go to the documentation of this file.
1
/*
2
winamp remote control suite �Patrick Michael Martin 2000, 2001, 2002
3
4
Copyright (C) 2000,2001,2002 Patrick M. Martin
5
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public License
8
as published by the Free Software Foundation; either version 2
9
of the License, or (at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20
Patrick M. Martin may be reached by email at patrickmmartin@gmail.com.
21
*/
22
23
#include <vcl.h>
24
#pragma hdrstop
25
26
#include "
SettingsF.h
"
27
#include "
MainF.h
"
28
#include "
waint.h
"
29
#include "
GlassExtender.h
"
30
#include "
remoteDM.h
"
31
32
#pragma package(smart_init)
33
#pragma resource "*.dfm"
34
35
36
37
38
TfrmSettings
*
frmSettings
;
39
40
__fastcall
TfrmSettings::TfrmSettings
(TComponent* Owner)
41
: TForm(Owner)
42
{
43
}
44
45
void
__fastcall
TfrmSettings::FormCreate
(TObject *)
46
{
47
48
Bars =
new
TList;
49
Bars->Add(
TrackBar1
);
50
Bars->Add(
TrackBar2
);
51
Bars->Add(
TrackBar3
);
52
Bars->Add(
TrackBar4
);
53
Bars->Add(
TrackBar5
);
54
Bars->Add(
TrackBar6
);
55
Bars->Add(
TrackBar7
);
56
Bars->Add(
TrackBar8
);
57
Bars->Add(
TrackBar9
);
58
Bars->Add(
TrackBar10
);
59
Bars->Add(
TrackBar11
);
60
61
pgcSettings
->ActivePage =
tbsVol
;
62
63
dmRemote
->
registerForm
(
this
);
64
65
}
66
67
68
void
__fastcall
TfrmSettings::FormDestroy
(TObject *)
69
{
70
dmRemote
->
unRegisterForm
(
this
);
71
delete
Bars;
72
}
73
74
void
__fastcall
TfrmSettings::tbVolumeChange
(TObject *)
75
{
76
dmRemote
->
SetVolume
(
tbVolume
->Position);
77
}
78
79
80
void
__fastcall
TfrmSettings::tbBalanceChange
(TObject *)
81
{
82
dmRemote
->
SetBalance
(
tbBalance
->Position);
83
}
84
85
void
__fastcall
TfrmSettings::UpdateBars
(
bool
autoLoad,
bool
EqOn,
const
vector<int>& bands)
86
{
87
88
for
(
unsigned
int
i = 0; i < bands.size() ; i++)
89
{
90
( (TTrackBar *) Bars->Items[i])->Position = bands[i];
91
}
92
93
// last one...
94
dmRemote
->
Autoload
->Checked = autoLoad;
95
dmRemote
->
EQOn
->Checked = EqOn;
96
97
}
98
99
100
void
__fastcall
TfrmSettings::BarsChange
(TObject *Sender)
101
{
102
103
int
Index = Bars->IndexOf(Sender);
104
if
(Index > -1)
105
{
106
dmRemote
->
BarChange
(Index, (byte) ((TTrackBar *)Sender)->Position );
107
}
108
109
}
110
111
112
SettingsF.cpp
Generated by
1.8.1.1