Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move DAlert into the CapitalBe namespace #116

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/DAlert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
#define DEFAULT_RECT BRect(0, 0, 450, 75)
#define max(LHS, RHS) ((LHS) > (RHS) ? (LHS) : (RHS))


namespace CapitalBe {


// Globals ---------------------------------------------------------------------
static const unsigned int kAlertButtonMsg = 'ALTB';
static const int kSemTimeOut = 50000;
Expand Down Expand Up @@ -715,3 +719,6 @@ _DAlertFilter_::Filter(BMessage* msg, BHandler** target)

return B_DISPATCH_MESSAGE;
}


} // namespace CapitalBe
30 changes: 19 additions & 11 deletions src/DAlert.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
// Description: DAlert displays a modal alert window.
//------------------------------------------------------------------------------

#ifndef _ALERT_H
#define _ALERT_H
#ifndef DALERT_H
#define DALERT_H

// Standard Includes -----------------------------------------------------------

// System Includes -------------------------------------------------------------
#include <Alert.h>
#include <BeBuild.h>
#include <Window.h>

Expand All @@ -47,6 +46,8 @@ class BButton;
class BInvoker;
class BTextView;

namespace CapitalBe {

// enum for flavors of alert ---------------------------------------------------
enum alert_type {
B_EMPTY_ALERT = 0,
Expand Down Expand Up @@ -126,13 +127,20 @@ class DAlert : public BWindow {
uint32 _reserved[4];
};

//------------------------------------------------------------------------------
} // namespace CapitalBe

using CapitalBe::alert_type;
using CapitalBe::button_spacing;
using CapitalBe::DAlert;
using CapitalBe::alert_type::B_EMPTY_ALERT;
using CapitalBe::alert_type::B_IDEA_ALERT;
using CapitalBe::alert_type::B_INFO_ALERT;
using CapitalBe::alert_type::B_STOP_ALERT;
using CapitalBe::alert_type::B_WARNING_ALERT;
using CapitalBe::button_spacing::B_EVEN_SPACING;
using CapitalBe::button_spacing::B_OFFSET_SPACING;

#endif // _ALERT_H

/*
* $Log $
*
* $Id $
*
*/
//------------------------------------------------------------------------------

#endif // DALERT_H
Loading