Top100
Your Personal Movie List (C++17 CLI + library)
Loading...
Searching...
No Matches
add_dialog.h
1// SPDX-License-Identifier: Apache-2.0
2//-------------------------------------------------------------------------------
3// Top100 — Your Personal Movie List
4//
5// File: ui/haiku/add_dialog.h
6// Purpose: Simple modal dialog to enter an IMDb ID and send back to parent.
7//-------------------------------------------------------------------------------
8#pragma once
9
10#ifdef __HAIKU__
11#include <Window.h>
12#include <TextControl.h>
13#include <Button.h>
14
15// Message sent to the parent window when OK is pressed.
16constexpr uint32 kMsgAddByImdbOk = 'adbk';
17
18class AddByImdbWindow : public BWindow {
19public:
20 explicit AddByImdbWindow(BMessenger target);
21 void MessageReceived(BMessage* msg) override;
22 bool QuitRequested() override;
23
24private:
25 enum { kMsgOk = 'ok__', kMsgCancel = 'cncl' };
26 BTextControl* imdbField_ = nullptr;
27 BButton* okBtn_ = nullptr;
28 BButton* cancelBtn_ = nullptr;
29 BMessenger target_;
30};
31
32#endif // __HAIKU__