2021-06-18 01:13:02 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2009-2010, Pier Luigi Fiorini. All rights reserved.
|
|
|
|
* Copyright 2021, Jaidyn Levesque. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _TEMPLATE_WINDOW_H
|
|
|
|
#define _TEMPLATE_WINDOW_H
|
|
|
|
|
|
|
|
#include <String.h>
|
|
|
|
#include <Window.h>
|
|
|
|
|
|
|
|
#include "ProtocolTemplate.h"
|
|
|
|
|
2021-06-18 12:49:30 -05:00
|
|
|
class BAlert;
|
2021-06-18 01:13:02 -05:00
|
|
|
class BMenu;
|
|
|
|
class BMenuField;
|
|
|
|
class BTextControl;
|
|
|
|
class ProtocolSettings;
|
|
|
|
class TemplateView;
|
|
|
|
|
|
|
|
|
|
|
|
class TemplateWindow : public BWindow {
|
|
|
|
public:
|
2021-06-19 18:25:58 -05:00
|
|
|
/*! Get template from selected account's protocol
|
2021-06-20 12:44:20 -05:00
|
|
|
* via ChatProtocol::SettingsTemplate() */
|
2021-06-18 01:13:02 -05:00
|
|
|
TemplateWindow(const char* title,
|
|
|
|
const char* templateType, BMessage* msg,
|
2022-02-23 15:42:46 -06:00
|
|
|
bigtime_t instance = -1);
|
2021-06-19 18:25:58 -05:00
|
|
|
|
|
|
|
/*! Use only the given template. */
|
|
|
|
TemplateWindow(const char* title,
|
|
|
|
ProtocolTemplate* temp, BMessage* msg,
|
2022-02-23 15:42:46 -06:00
|
|
|
bigtime_t instance = -1);
|
2021-06-18 01:13:02 -05:00
|
|
|
|
|
|
|
virtual void MessageReceived(BMessage* msg);
|
|
|
|
|
|
|
|
void SetTarget(BHandler* target);
|
|
|
|
|
|
|
|
private:
|
2021-06-19 18:25:58 -05:00
|
|
|
void _InitInterface(bigtime_t instance);
|
2021-06-18 01:13:02 -05:00
|
|
|
void _LoadTemplate();
|
|
|
|
|
2021-08-06 11:10:05 -05:00
|
|
|
int64 fSelectedAcc;
|
2021-06-18 01:13:02 -05:00
|
|
|
BMenuField* fMenuField;
|
|
|
|
|
|
|
|
ProtocolTemplate* fTemplate;
|
|
|
|
BString fTemplateType;
|
|
|
|
TemplateView* fTemplateView;
|
|
|
|
|
|
|
|
BButton* fOkButton;
|
|
|
|
|
|
|
|
BMessage* fMessage;
|
|
|
|
BHandler* fTarget;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _TEMPLATE_WINDOW_H
|