Added rbTone and rbPulse - Radio Buttons

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@583 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Phil Greenway
2002-08-05 02:27:50 +00:00
parent 151edf0672
commit 6c657a0ed5
+21
View File
@@ -19,6 +19,7 @@ ModemWindow by Sikosis ([email protected])
#include <MenuItem.h>
#include <OutlineListView.h>
#include <Point.h>
#include <RadioButton.h>
#include <Shape.h>
#include <stdio.h>
#include <TextControl.h>
@@ -39,6 +40,8 @@ const uint32 MENU = 'Menu';
const uint32 CHK_MAKE_CONNECTION = 'CKMC';
const uint32 CHK_SHOW_TERMINAL = 'CKST';
const uint32 CHK_LOG_ALL = 'CKLA';
const uint32 RB_TONE_DIALING = 'RBTn';
const uint32 RB_PULSE_DIALING = 'RBPd';
// ModemWindow -- constructor for ModemWindow Class
ModemWindow::ModemWindow(BRect frame) : BWindow (frame, "", B_MODAL_WINDOW, B_NOT_RESIZABLE , 0)
@@ -77,6 +80,7 @@ void ModemWindow::InitWindow(void)
BRect mfld2(28,45,350,55);
BMenuItem *menu2[100];
ConnectViaMenu = new BMenu("serial 1 ");
//ConnectViaMenu->AddSeparatorItem();
ConnectViaMenu->AddItem(menu2[1] = new BMenuItem("serial 2 ", new BMessage(MENU)));
menu2[1]->SetTarget(be_app);
@@ -101,6 +105,19 @@ void ModemWindow::InitWindow(void)
tvRedial->MakeSelectable(false);
tvRedial->MakeEditable(false);
// TextView - Use:
BRect UseLocation (15,142,40,154);
tvUse = new BTextView(r, "Use", UseLocation, B_FOLLOW_ALL, B_WILL_DRAW);
tvUse->SetText("Use:");
tvUse->MakeSelectable(false);
tvUse->MakeEditable(false);
// RadioButton - Use Tone or Pulse
BRect RBToneLocation(42,140,350,152);
rbTone = new BRadioButton(RBToneLocation,"Tone","Tone dialing", new BMessage(RB_TONE_DIALING), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
BRect RBPulseLocation(125,140,350,152);
rbPulse = new BRadioButton(RBPulseLocation,"Pulse","Pulse dialing", new BMessage(RB_PULSE_DIALING), B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE);
// TextView - TimesBusySignal
BRect TimesBusySignalLocation (82,112,400,132);
tvTimesBusySignal = new BTextView(r, "TimesBusySignal", TimesBusySignalLocation, B_FOLLOW_ALL, B_WILL_DRAW);
@@ -147,6 +164,9 @@ void ModemWindow::InitWindow(void)
AddChild(chkMakeConnection);
AddChild(chkShowTerminal);
AddChild(chkLogAll);
AddChild(rbPulse);
AddChild(rbTone);
AddChild(tvUse);
AddChild(tvRedial);
AddChild(tvTimesBusySignal);
AddChild(tvReadLogPath);
@@ -176,6 +196,7 @@ void ModemWindow::MessageReceived (BMessage *message)
break;
case BTN_MODEM_WINDOW_CANCEL:
Hide(); // must find a better way to close this window and not the entire application
// any suggestions would be greatly appreciated ;)
break;
default:
BWindow::MessageReceived(message);