Skip to content

Commit

Permalink
move DAlert into the CapitalBe namespace
Browse files Browse the repository at this point in the history
fix the header guard
  • Loading branch information
korli committed Sep 11, 2024
1 parent 0d5bdae commit f62c9cf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
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

0 comments on commit f62c9cf

Please sign in to comment.