LIBURANIA
GUI library (a wrapper of Win32 API) in C++
読み取り中…
検索中…
一致する文字列を見つけられません
clkpanel.h
[詳解]
1
/*
2
* Copyright 2000-2024 oZ/acy (名賀月晃嗣)
3
* Redistribution and use in source and binary forms,
4
* with or without modification,
5
* are permitted provided that the following conditions are met:
6
*
7
* 1. Redistributions of source code must retain the above copyright notice,
8
* this list of conditions and the following disclaimer.
9
*
10
* 2. Redistributions in binary form must reproduce the above copyright notice,
11
* this list of conditions and the following disclaimer in the documentation
12
* and/or other materials provided with the distribution.
13
*
14
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
18
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
*
26
*/
36
#ifndef INCLUDE_GUARD_URANIA_CLKPANEL_H
37
#define INCLUDE_GUARD_URANIA_CLKPANEL_H
38
39
#include <any>
40
#include "
bwin.h
"
41
42
43
namespace
urania
{
44
46
class
ClickPanel
:
public
urania::BasicWindow
47
{
48
public
:
49
using
PH_
= void (*)(
urania::BasicWindow
*,
urania::PaintDevice
*, std::any&);
50
51
private
:
52
HWND pw_;
53
int
id_;
54
PH_
ph_;
55
std::any app_;
56
57
ClickPanel
(
PH_
p,
const
std::any& a) : ph_(p), app_(a) {}
58
59
LRESULT wproc_(UINT msg, WPARAM wp, LPARAM lp)
override
;
60
61
void
init_(HWND hw)
override
62
{
63
bindHWND_
(hw);
64
}
65
66
void
uninit_()
override
67
{
68
unbindHWND_
();
69
}
70
71
72
public
:
73
~ClickPanel
() {}
74
84
static
85
std::unique_ptr<ClickPanel>
86
create
(
87
int
x,
int
y,
int
w,
int
h,
PH_
ph,
const
std::any& ap,
88
WndBase
* par,
int
id
);
89
91
void
paint
(
BasicWindow
* w,
PaintDevice
* pdev)
92
{
93
if
(ph_)
94
ph_(w, pdev, app_);
95
}
96
};
97
98
99
}
// end of namespace urania
100
101
102
#endif
// INCLUDE_GUARD_URANIA_CLKPANEL_H
bwin.h
Window用基底クラス
urania::BasicWindow
Window管理・操作用基底クラス
Definition
bwin.h:54
urania::BasicWindow::unbindHWND_
void unbindHWND_()
HWNDからBasicWindowオブジェクトへの結合を切斷
Definition
bwin.h:149
urania::BasicWindow::bindHWND_
void bindHWND_(HWND hw)
BasicWindowオブジェクトとHWNDの二重結合を形成
Definition
bwin.h:142
urania::ClickPanel
クリックパネルコントロール
Definition
clkpanel.h:47
urania::ClickPanel::PH_
void(*)(urania::BasicWindow *, urania::PaintDevice *, std::any &) PH_
Definition
clkpanel.h:49
urania::ClickPanel::paint
void paint(BasicWindow *w, PaintDevice *pdev)
描畫ハンドラを呼び出す。
Definition
clkpanel.h:91
urania::ClickPanel::create
static std::unique_ptr< ClickPanel > create(int x, int y, int w, int h, PH_ ph, const std::any &ap, WndBase *par, int id)
クリックパネルの生成
Definition
clkpanel.cpp:36
urania::ClickPanel::~ClickPanel
~ClickPanel()
Definition
clkpanel.h:73
urania::PaintDevice
Definition
paintdev.h:212
urania::WndBase
HWND管理用基底クラス
Definition
wbase.h:55
urania
Definition
clkpanel.h:43
2024年03月28日(木) 15時12分57秒作成 - LIBURANIA / 構成:
1.10.0