45 lines
1.4 KiB
C++
45 lines
1.4 KiB
C++
#ifndef TJD_UI_APP_CALENDAR_PRESENTER_H
|
|
#define TJD_UI_APP_CALENDAR_PRESENTER_H
|
|
|
|
#include "Presenter.h"
|
|
#include "TjdUiScreenDrag.h"
|
|
#include "components/root_view.h"
|
|
#include "components/ui_slider.h"
|
|
#include "components/ui_view.h"
|
|
#include "graphic_timer.h"
|
|
#include <string>
|
|
namespace TJD {
|
|
|
|
class TjdUiAppCalendarView;
|
|
class TjdUiAppCalendarPresenter : public OHOS::Presenter<TjdUiAppCalendarView>,
|
|
public OHOS::UIView::OnClickListener,
|
|
public TjdUiScreenDragListener,
|
|
public OHOS::RootView::OnKeyActListener
|
|
{
|
|
public:
|
|
TjdUiAppCalendarPresenter();
|
|
virtual ~TjdUiAppCalendarPresenter();
|
|
static TjdUiAppCalendarPresenter &GetInstance(void);
|
|
void OnStart() override;
|
|
void OnPause() override;
|
|
void OnResume() override;
|
|
void OnStop() override;
|
|
bool OnClick(OHOS::UIView &view, const OHOS::ClickEvent &event) override;
|
|
void ScreenDragEventCallback(OHOS::UIView &view, const OHOS::KeyEvent &event) { ViewExitEvent(true); }
|
|
bool OnKeyAct(OHOS::UIView &view, const OHOS::KeyEvent &event);
|
|
void OnClickTrans(OHOS::UIView &view);
|
|
bool IsChinese();
|
|
void ViewExitEvent(bool isSwipe);
|
|
|
|
private:
|
|
bool initFlag_{false};
|
|
bool isExit_{true};
|
|
uint16_t leftStartX_{0};
|
|
uint16_t leftEndX_{0};
|
|
uint16_t rightStartX_{0};
|
|
uint16_t rightEndX_{0};
|
|
};
|
|
|
|
} // namespace TJD
|
|
|
|
#endif |