HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
BM_InputSelector.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: BM_InputSelector.h ( Direct Manipulation Library, C++)
7
*
8
* COMMENTS:
9
* The base class for objects that select the inputs of an op.
10
*/
11
12
#ifndef __BM_InputSelector_h__
13
#define __BM_InputSelector_h__
14
15
#include "
BM_API.h
"
16
#include <
PI/PI_ResourceTemplate.h
>
17
#include <
SI/AP_Interface.h
>
18
#include <
RE/RE_RenderContext.h
>
19
20
class
BM_View;
21
class
OP_Node
;
22
class
RE_Render
;
23
24
class
BM_API
BM_InputSelector
:
public
AP_Interface
25
{
26
public
:
27
BM_InputSelector
(BM_View &viewer,
28
PI_SelectorTemplate
&templ);
29
~
BM_InputSelector
()
override
;
30
31
const
char
*
className
()
const override
;
32
33
// The selector handles mouse events and modifies the selection
34
// accordingly. Return 1 if the event was consumed and 0 otherwise.
35
virtual
int
handleMouseEvent(
UI_Event
*
event
);
36
37
// Return 1 if the event was consumed and 0 otherwise.
38
virtual
int
handleMouseWheelEvent(
UI_Event
*event);
39
40
// Return true if handled.
41
virtual
bool
handleDoubleClickEvent(
UI_Event
*event);
42
43
virtual
void
handleNodeDeleted(
OP_Node
&node);
44
45
PI_SelectorTemplate
&
getTemplate
() {
return
myTemplate; }
46
const
PI_SelectorTemplate
&
getTemplate
()
const
{
return
myTemplate; }
47
48
// This method allows the resource manager can set the viewer (and
49
// associated scene manager) to something different if a selector is
50
// reused. It should not be used otherwise. A nil pointer is allowed so
51
// the select can remove any of its interests. However, methods of the
52
// selector should never be called when its viewer is nil. The method is
53
// virtual so descendants can also have a chance to clean up.
54
virtual
void
setViewer(BM_View *viewer);
55
56
// Do any special rendering required by this selector.
57
virtual
void
doRender(
RE_RenderContext
r
,
int
x
,
int
y
,
int
ghost);
58
59
virtual
void
overlayRender(
RE_RenderContext
r
,
int
x
,
int
y
);
60
61
// This method is called by the resource manager after the selector is
62
// created.
63
void
initializeUI();
64
65
// Some states use this virtual to query whether or not this selector
66
// needs locate mouse messages (mouse moves with no buttons down).
67
virtual
int
hasLocates
()
const
{
return
0; }
68
69
// The selector needs to be notified when it starts/stops selecting
70
// so it can add/remove interests (the selection type, etc.).
71
virtual
void
startSelecting();
72
virtual
void
stopSelecting();
73
74
virtual
const
char
*cursor()
const
;
75
76
77
virtual
bool
getStateParmNames
(
UT_StringArray
&ret,
const
char
* prefix=
nullptr
) {
return
false
;}
78
virtual
bool
evalStateParm
(
const
char
*
name
,
UT_StringHolder
&ret) {
return
false
;}
79
virtual
bool
setStateParm
(
const
char
*
name
,
const
UT_StringHolder
&
val
) {
return
false
;}
80
virtual
bool
pressStateButton
(
const
char
*
name
) {
return
false
;}
81
protected
:
82
BM_View &
baseViewer
() {
return
*myBaseViewer; }
83
const
BM_View &
baseViewer
()
const
{
return
*myBaseViewer; }
84
85
// Do the AP_Interface initialization. This is called by initializeUI().
86
// By default this method does nothing, but subclasses have the option
87
// of parsing a UI file here.
88
void
initApplication
(UI_Manager *,
89
int
,
90
const
char
**)
override
;
91
92
private
:
93
PI_SelectorTemplate
&myTemplate;
94
95
BM_View *myBaseViewer;
96
const
char
*myBumpedCursor;
// cursor I'm replacing when active
97
};
98
99
#endif
RE_RenderContext.h
BM_InputSelector::baseViewer
BM_View & baseViewer()
Definition:
BM_InputSelector.h:82
BM_InputSelector
Definition:
BM_InputSelector.h:24
BM_InputSelector::getTemplate
PI_SelectorTemplate & getTemplate()
Definition:
BM_InputSelector.h:45
AP_Interface::className
const char * className() const override
AP_Interface
Definition:
AP_Interface.h:51
y
GLint y
Definition:
glcorearb.h:103
BM_InputSelector::getTemplate
const PI_SelectorTemplate & getTemplate() const
Definition:
BM_InputSelector.h:46
BM_InputSelector::getStateParmNames
virtual bool getStateParmNames(UT_StringArray &ret, const char *prefix=nullptr)
Definition:
BM_InputSelector.h:77
RE_RenderContext
Temporary container for either a RV_Render and an RE_Render.
Definition:
RE_RenderContext.h:23
event
struct _cl_event * event
Definition:
glcorearb.h:2961
UT_StringHolder
Definition:
UT_StringHolder.h:1074
PI_ResourceTemplate.h
UT_StringArray
Definition:
UT_StringArray.h:24
BM_InputSelector::setStateParm
virtual bool setStateParm(const char *name, const UT_StringHolder &val)
Definition:
BM_InputSelector.h:79
OP_Node
Definition:
OP_Node.h:528
RE_Render
Definition:
RE_Render.h:29
name
GLuint const GLchar * name
Definition:
glcorearb.h:786
BM_InputSelector::hasLocates
virtual int hasLocates() const
Definition:
BM_InputSelector.h:67
x
GLint GLenum GLint x
Definition:
glcorearb.h:409
BM_API
#define BM_API
Definition:
BM_API.h:10
UI_Event
Definition:
UI_Event.h:17
AP_Interface::initApplication
virtual void initApplication(UI_Manager *uims, int argc, const char **argv)
PI_SelectorTemplate
Definition:
PI_ResourceTemplate.h:264
AP_Interface.h
BM_InputSelector::baseViewer
const BM_View & baseViewer() const
Definition:
BM_InputSelector.h:83
val
GLuint GLfloat * val
Definition:
glcorearb.h:1608
r
GLboolean r
Definition:
glcorearb.h:1222
BM_API.h
BM_InputSelector::evalStateParm
virtual bool evalStateParm(const char *name, UT_StringHolder &ret)
Definition:
BM_InputSelector.h:78
BM_InputSelector::pressStateButton
virtual bool pressStateButton(const char *name)
Definition:
BM_InputSelector.h:80
BM
BM_InputSelector.h
Generated on Thu Aug 20 2026 02:14:19 for HDK by
1.8.6