Slightly rearrange BreakpointsView.

Line up the buttons along the bottom rather than the side.
Add button to invoke exception configuration window.
This commit is contained in:
Rene Gollent 2013-06-13 20:39:51 -04:00
parent 55fc8da143
commit f4d95e0e19
2 changed files with 12 additions and 4 deletions

View File

@ -28,6 +28,7 @@ BreakpointsView::BreakpointsView(Team* team, Listener* listener)
BGroupView(B_HORIZONTAL, 4.0f),
fTeam(team),
fListView(NULL),
fConfigureExceptionsButton(NULL),
fToggleBreakpointButton(NULL),
fRemoveBreakpointButton(NULL),
fListener(listener)
@ -93,6 +94,7 @@ BreakpointsView::MessageReceived(BMessage* message)
case MSG_CLEAR_BREAKPOINT:
_HandleBreakpointAction(message->what);
break;
default:
BGroupView::MessageReceived(message);
break;
@ -103,6 +105,7 @@ BreakpointsView::MessageReceived(BMessage* message)
void
BreakpointsView::AttachedToWindow()
{
fConfigureExceptionsButton->SetTarget(Window());
fToggleBreakpointButton->SetTarget(this);
fRemoveBreakpointButton->SetTarget(this);
}
@ -145,15 +148,19 @@ BreakpointsView::BreakpointSelectionChanged(BreakpointProxyList& proxies)
void
BreakpointsView::_Init()
{
BLayoutBuilder::Group<>(this, B_HORIZONTAL, 0.0f)
BLayoutBuilder::Group<>(this, B_VERTICAL, 0.0f)
.Add(fListView = BreakpointListView::Create(fTeam, this, this))
.AddGroup(B_VERTICAL, B_USE_SMALL_SPACING)
.AddGroup(B_HORIZONTAL, B_USE_SMALL_SPACING)
.SetInsets(B_USE_SMALL_SPACING)
.Add(fToggleBreakpointButton = new BButton("Toggle"))
.Add(fRemoveBreakpointButton = new BButton("Remove"))
.AddGlue()
.Add(fConfigureExceptionsButton = new BButton(
"Configure exceptions" B_UTF8_ELLIPSIS))
.Add(fRemoveBreakpointButton = new BButton("Remove"))
.Add(fToggleBreakpointButton = new BButton("Toggle"))
.End();
fConfigureExceptionsButton->SetMessage(new BMessage(
MSG_SHOW_EXCEPTION_CONFIG_WINDOW));
fToggleBreakpointButton->SetMessage(new BMessage(MSG_ENABLE_BREAKPOINT));
fRemoveBreakpointButton->SetMessage(new BMessage(MSG_CLEAR_BREAKPOINT));

View File

@ -54,6 +54,7 @@ private:
Team* fTeam;
BreakpointListView* fListView;
BreakpointProxyList fSelectedBreakpoints;
BButton* fConfigureExceptionsButton;
BButton* fToggleBreakpointButton;
BButton* fRemoveBreakpointButton;
Listener* fListener;