Fix warnings and some coding style issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38773 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,8 +17,9 @@
|
|||||||
class HelloWorldWindow : public BWindow {
|
class HelloWorldWindow : public BWindow {
|
||||||
public:
|
public:
|
||||||
HelloWorldWindow(BRect frame)
|
HelloWorldWindow(BRect frame)
|
||||||
: BWindow(frame, "ALM Hello World",
|
:
|
||||||
B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE)
|
BWindow(frame, "ALM Hello World", B_TITLED_WINDOW,
|
||||||
|
B_QUIT_ON_WINDOW_CLOSE)
|
||||||
{
|
{
|
||||||
button1 = new BButton("Hello World!");
|
button1 = new BButton("Hello World!");
|
||||||
|
|
||||||
@@ -48,7 +49,8 @@ private:
|
|||||||
class HelloWorld : public BApplication {
|
class HelloWorld : public BApplication {
|
||||||
public:
|
public:
|
||||||
HelloWorld()
|
HelloWorld()
|
||||||
: BApplication("application/x-vnd.haiku.HelloWorld")
|
:
|
||||||
|
BApplication("application/x-vnd.haiku.HelloWorld")
|
||||||
{
|
{
|
||||||
BRect frameRect;
|
BRect frameRect;
|
||||||
frameRect.Set(100, 100, 300, 300);
|
frameRect.Set(100, 100, 300, 300);
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
class PinwheelWindow : public BWindow {
|
class PinwheelWindow : public BWindow {
|
||||||
public:
|
public:
|
||||||
PinwheelWindow(BRect frame)
|
PinwheelWindow(BRect frame)
|
||||||
: BWindow(frame, "ALM Pinwheel",
|
:
|
||||||
B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE)
|
BWindow(frame, "ALM Pinwheel", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE)
|
||||||
{
|
{
|
||||||
button1 = new BButton("1");
|
button1 = new BButton("1");
|
||||||
button2 = new BButton("2");
|
button2 = new BButton("2");
|
||||||
@@ -47,30 +47,17 @@ public:
|
|||||||
YTab* y1 = layout->AddYTab();
|
YTab* y1 = layout->AddYTab();
|
||||||
YTab* y2 = layout->AddYTab();
|
YTab* y2 = layout->AddYTab();
|
||||||
|
|
||||||
Area* a1 = layout->AddArea(
|
Area* a1 = layout->AddArea(layout->Left(), layout->Top(), x2, y1,
|
||||||
layout->Left(), layout->Top(),
|
|
||||||
x2, y1,
|
|
||||||
button1);
|
button1);
|
||||||
Area* a2 = layout->AddArea(
|
layout->AddArea(x2, layout->Top(), layout->Right(), y2, button2);
|
||||||
x2, layout->Top(),
|
Area* a3 = layout->AddArea(x1, y2, layout->Right(), layout->Bottom(),
|
||||||
layout->Right(), y2,
|
|
||||||
button2);
|
|
||||||
Area* a3 = layout->AddArea(
|
|
||||||
x1, y2,
|
|
||||||
layout->Right(), layout->Bottom(),
|
|
||||||
button3);
|
button3);
|
||||||
Area* a4 = layout->AddArea(
|
layout->AddArea(layout->Left(), y1, x1, layout->Bottom(), button4);
|
||||||
layout->Left(), y1,
|
layout->AddArea(x1, y1, x2, y2, textView1);
|
||||||
x1, layout->Bottom(),
|
|
||||||
button4);
|
|
||||||
Area* a5 = layout->AddArea(
|
|
||||||
x1, y1,
|
|
||||||
x2, y2,
|
|
||||||
textView1);
|
|
||||||
|
|
||||||
a1->HasSameSizeAs(a3);
|
a1->HasSameSizeAs(a3);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BButton* button1;
|
BButton* button1;
|
||||||
BButton* button2;
|
BButton* button2;
|
||||||
@@ -83,7 +70,8 @@ private:
|
|||||||
class Pinwheel : public BApplication {
|
class Pinwheel : public BApplication {
|
||||||
public:
|
public:
|
||||||
Pinwheel()
|
Pinwheel()
|
||||||
: BApplication("application/x-vnd.haiku.Pinwheel")
|
:
|
||||||
|
BApplication("application/x-vnd.haiku.Pinwheel")
|
||||||
{
|
{
|
||||||
BRect frameRect;
|
BRect frameRect;
|
||||||
frameRect.Set(100, 100, 300, 300);
|
frameRect.Set(100, 100, 300, 300);
|
||||||
|
|||||||
@@ -34,13 +34,9 @@ public:
|
|||||||
// create an extra tab
|
// create an extra tab
|
||||||
XTab* x1 = layout->AddXTab();
|
XTab* x1 = layout->AddXTab();
|
||||||
|
|
||||||
Area* a1 = layout->AddArea(
|
layout->AddArea(layout->Left(), layout->Top(), x1, layout->Bottom(),
|
||||||
layout->Left(), layout->Top(),
|
|
||||||
x1, layout->Bottom(),
|
|
||||||
button1);
|
button1);
|
||||||
Area* a2 = layout->AddArea(
|
layout->AddArea(x1, layout->Top(), layout->Right(), layout->Bottom(),
|
||||||
x1, layout->Top(),
|
|
||||||
layout->Right(), layout->Bottom(),
|
|
||||||
textView1);
|
textView1);
|
||||||
|
|
||||||
// add a constraint: 2*x1 == right
|
// add a constraint: 2*x1 == right
|
||||||
|
|||||||
Reference in New Issue
Block a user