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:
@@ -19,6 +19,7 @@ ModemWindow by Sikosis ([email protected])
|
|||||||
#include <MenuItem.h>
|
#include <MenuItem.h>
|
||||||
#include <OutlineListView.h>
|
#include <OutlineListView.h>
|
||||||
#include <Point.h>
|
#include <Point.h>
|
||||||
|
#include <RadioButton.h>
|
||||||
#include <Shape.h>
|
#include <Shape.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <TextControl.h>
|
#include <TextControl.h>
|
||||||
@@ -39,6 +40,8 @@ const uint32 MENU = 'Menu';
|
|||||||
const uint32 CHK_MAKE_CONNECTION = 'CKMC';
|
const uint32 CHK_MAKE_CONNECTION = 'CKMC';
|
||||||
const uint32 CHK_SHOW_TERMINAL = 'CKST';
|
const uint32 CHK_SHOW_TERMINAL = 'CKST';
|
||||||
const uint32 CHK_LOG_ALL = 'CKLA';
|
const uint32 CHK_LOG_ALL = 'CKLA';
|
||||||
|
const uint32 RB_TONE_DIALING = 'RBTn';
|
||||||
|
const uint32 RB_PULSE_DIALING = 'RBPd';
|
||||||
|
|
||||||
// ModemWindow -- constructor for ModemWindow Class
|
// ModemWindow -- constructor for ModemWindow Class
|
||||||
ModemWindow::ModemWindow(BRect frame) : BWindow (frame, "", B_MODAL_WINDOW, B_NOT_RESIZABLE , 0)
|
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);
|
BRect mfld2(28,45,350,55);
|
||||||
BMenuItem *menu2[100];
|
BMenuItem *menu2[100];
|
||||||
ConnectViaMenu = new BMenu("serial 1 ");
|
ConnectViaMenu = new BMenu("serial 1 ");
|
||||||
|
|
||||||
//ConnectViaMenu->AddSeparatorItem();
|
//ConnectViaMenu->AddSeparatorItem();
|
||||||
ConnectViaMenu->AddItem(menu2[1] = new BMenuItem("serial 2 ", new BMessage(MENU)));
|
ConnectViaMenu->AddItem(menu2[1] = new BMenuItem("serial 2 ", new BMessage(MENU)));
|
||||||
menu2[1]->SetTarget(be_app);
|
menu2[1]->SetTarget(be_app);
|
||||||
@@ -101,6 +105,19 @@ void ModemWindow::InitWindow(void)
|
|||||||
tvRedial->MakeSelectable(false);
|
tvRedial->MakeSelectable(false);
|
||||||
tvRedial->MakeEditable(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
|
// TextView - TimesBusySignal
|
||||||
BRect TimesBusySignalLocation (82,112,400,132);
|
BRect TimesBusySignalLocation (82,112,400,132);
|
||||||
tvTimesBusySignal = new BTextView(r, "TimesBusySignal", TimesBusySignalLocation, B_FOLLOW_ALL, B_WILL_DRAW);
|
tvTimesBusySignal = new BTextView(r, "TimesBusySignal", TimesBusySignalLocation, B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
@@ -147,6 +164,9 @@ void ModemWindow::InitWindow(void)
|
|||||||
AddChild(chkMakeConnection);
|
AddChild(chkMakeConnection);
|
||||||
AddChild(chkShowTerminal);
|
AddChild(chkShowTerminal);
|
||||||
AddChild(chkLogAll);
|
AddChild(chkLogAll);
|
||||||
|
AddChild(rbPulse);
|
||||||
|
AddChild(rbTone);
|
||||||
|
AddChild(tvUse);
|
||||||
AddChild(tvRedial);
|
AddChild(tvRedial);
|
||||||
AddChild(tvTimesBusySignal);
|
AddChild(tvTimesBusySignal);
|
||||||
AddChild(tvReadLogPath);
|
AddChild(tvReadLogPath);
|
||||||
@@ -176,6 +196,7 @@ void ModemWindow::MessageReceived (BMessage *message)
|
|||||||
break;
|
break;
|
||||||
case BTN_MODEM_WINDOW_CANCEL:
|
case BTN_MODEM_WINDOW_CANCEL:
|
||||||
Hide(); // must find a better way to close this window and not the entire application
|
Hide(); // must find a better way to close this window and not the entire application
|
||||||
|
// any suggestions would be greatly appreciated ;)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BWindow::MessageReceived(message);
|
BWindow::MessageReceived(message);
|
||||||
|
|||||||
Reference in New Issue
Block a user