xref: /haiku/src/preferences/joysticks/PortItem.cpp (revision 77d9a1e9bc5cce4b7f200f8c50676b25d3b9ba67)
1 /*
2  * Copyright 2008 Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Fredrik Modéen 			fredrik@modeen.se
7  */
8 
9 #include "PortItem.h"
10 
PortItem(const char * label)11 PortItem::PortItem(const char* label)
12 :BStringItem(label)
13 {}
14 
15 
~PortItem()16 PortItem::~PortItem()
17 {}
18 
19 void
DrawItem(BView * owner,BRect frame,bool complete)20 PortItem::DrawItem(BView *owner, BRect frame, bool complete)
21 {
22 	BStringItem::DrawItem(owner, frame, complete);
23 }
24 
25 BString
GetOldJoystickName()26 PortItem::GetOldJoystickName()
27 {
28 	return fOldSelectedJoystick;
29 }
30 
31 
32 BString
GetJoystickName()33 PortItem::GetJoystickName()
34 {
35 	return fSelectedJoystick;
36 }
37 
38 
39 void
SetJoystickName(BString str)40 PortItem::SetJoystickName(BString str)
41 {
42 	fOldSelectedJoystick = fSelectedJoystick;
43 	fSelectedJoystick = str;
44 }
45