11/*
22 Simple DirectMedia Layer
3- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
4- Copyright (C) 2018 EXL <exlmotodev@gmail.com>
3+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4+ Copyright (C) 2018-2019 EXL <exlmotodev@gmail.com>
55
66 This software is provided 'as-is', without any express or implied
77 warranty. In no event will the authors be held liable for any damages
5454 G_MAX_STRING_LENGTH_BYTES = 120
5555};
5656
57- class BE_SDL_MessageBox : public BAlert
57+ class HAIKU_SDL_MessageBox : public BAlert
5858{
5959 float fComputedMessageBoxWidth ;
6060
@@ -68,9 +68,9 @@ class BE_SDL_MessageBox : public BAlert
6868 rgb_color fTextColor ;
6969
7070 const char *fTitle ;
71- const char *BE_SDL_DefTitle ;
72- const char *BE_SDL_DefMessage ;
73- const char *BE_SDL_DefButton ;
71+ const char *HAIKU_SDL_DefTitle ;
72+ const char *HAIKU_SDL_DefMessage ;
73+ const char *HAIKU_SDL_DefButton ;
7474
7575 std::vector<const SDL_MessageBoxButtonData *> fButtons ;
7676
@@ -133,15 +133,15 @@ class BE_SDL_MessageBox : public BAlert
133133 {
134134 if (aMessageBoxData == NULL )
135135 {
136- SetTitle (BE_SDL_DefTitle );
137- SetMessageText (BE_SDL_DefMessage );
138- AddButton (BE_SDL_DefButton );
136+ SetTitle (HAIKU_SDL_DefTitle );
137+ SetMessageText (HAIKU_SDL_DefMessage );
138+ AddButton (HAIKU_SDL_DefButton );
139139 return ;
140140 }
141141
142142 if (aMessageBoxData->numbuttons <= 0 )
143143 {
144- AddButton (BE_SDL_DefButton );
144+ AddButton (HAIKU_SDL_DefButton );
145145 }
146146 else
147147 {
@@ -155,9 +155,9 @@ class BE_SDL_MessageBox : public BAlert
155155 }
156156
157157 (aMessageBoxData->title != NULL ) ?
158- SetTitle (aMessageBoxData->title ) : SetTitle (BE_SDL_DefTitle );
158+ SetTitle (aMessageBoxData->title ) : SetTitle (HAIKU_SDL_DefTitle );
159159 (aMessageBoxData->message != NULL ) ?
160- SetMessageText (aMessageBoxData->message ) : SetMessageText (BE_SDL_DefMessage );
160+ SetMessageText (aMessageBoxData->message ) : SetMessageText (HAIKU_SDL_DefMessage );
161161
162162 SetType (ConvertMessageBoxType (static_cast <SDL_MessageBoxFlags>(aMessageBoxData->flags )));
163163 }
@@ -274,7 +274,7 @@ class BE_SDL_MessageBox : public BAlert
274274 fButtons .push_back (&aButtons[i]);
275275 }
276276
277- std::sort (fButtons .begin (), fButtons .end (), &BE_SDL_MessageBox ::SortButtonsPredicate);
277+ std::sort (fButtons .begin (), fButtons .end (), &HAIKU_SDL_MessageBox ::SortButtonsPredicate);
278278
279279 size_t countButtons = fButtons .size ();
280280 for (size_t i = 0 ; i < countButtons; ++i)
@@ -304,14 +304,14 @@ class BE_SDL_MessageBox : public BAlert
304304
305305public:
306306 explicit
307- BE_SDL_MessageBox (const SDL_MessageBoxData *aMessageBoxData)
307+ HAIKU_SDL_MessageBox (const SDL_MessageBoxData *aMessageBoxData)
308308 : BAlert(NULL , NULL , NULL , NULL , NULL , B_WIDTH_FROM_LABEL , B_WARNING_ALERT ),
309309 fComputedMessageBoxWidth (0 .0f ),
310310 fCloseButton(G_CLOSE_BUTTON_ID ), fDefaultButton(G_DEFAULT_BUTTON_ID ),
311311 fCustomColorScheme(false ), fThereIsLongLine(false ),
312- BE_SDL_DefTitle (" SDL2 MessageBox" ),
313- BE_SDL_DefMessage (" Some information has been lost." ),
314- BE_SDL_DefButton (" OK" )
312+ HAIKU_SDL_DefTitle (" SDL2 MessageBox" ),
313+ HAIKU_SDL_DefMessage (" Some information has been lost." ),
314+ HAIKU_SDL_DefButton (" OK" )
315315 {
316316 // MessageBox settings.
317317 // We need a title to display it.
@@ -333,7 +333,7 @@ class BE_SDL_MessageBox : public BAlert
333333 }
334334
335335 virtual
336- ~BE_SDL_MessageBox (void )
336+ ~HAIKU_SDL_MessageBox (void )
337337 {
338338 fButtons .clear ();
339339 }
@@ -365,7 +365,7 @@ extern "C" {
365365#endif
366366
367367int
368- BE_ShowMessageBox (const SDL_MessageBoxData *messageboxdata, int *buttonid)
368+ HAIKU_ShowMessageBox (const SDL_MessageBoxData *messageboxdata, int *buttonid)
369369{
370370 // Initialize button by closed or error value first.
371371 *buttonid = G_CLOSE_BUTTON_ID ;
@@ -384,10 +384,10 @@ BE_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
384384 }
385385 }
386386
387- BE_SDL_MessageBox *SDL_MessageBox = new (std::nothrow) BE_SDL_MessageBox (messageboxdata);
387+ HAIKU_SDL_MessageBox *SDL_MessageBox = new (std::nothrow) HAIKU_SDL_MessageBox (messageboxdata);
388388 if (SDL_MessageBox == NULL )
389389 {
390- return SDL_SetError (" Cannot create the BE_SDL_MessageBox (BAlert inheritor) object. Lack of memory?" );
390+ return SDL_SetError (" Cannot create the HAIKU_SDL_MessageBox (BAlert inheritor) object. Lack of memory?" );
391391 }
392392 const int closeButton = SDL_MessageBox->GetCloseButtonId ();
393393 int pushedButton = SDL_MessageBox->Go ();
0 commit comments