 |
Gorgon Game Engine
|
Go to the documentation of this file.
6 #include "../Resource/GID.h"
8 #include "../DataExchange.h"
14 namespace Gorgon {
namespace Input {
854 std::cout<<
"Ready!"<<std::endl;
881 int GetSize()
const {
return (
int)data.GetSize(); }
891 if(!active)
throw std::runtime_error(
"There is no active target.");
909 if(!source)
throw std::runtime_error(
"There is no source.");
925 destroylist.Destroy();
935 bool dataready =
false;
956 template<
class D_,
class ...A_>
957 void begindrag(D_ &&data, A_&& ... rest) {
963 template<
class ...A_>
964 void begindrag(
const std::string &data, A_&& ... rest) {
969 template<
class ...A_>
970 void begindrag(
const char *data, A_&& ... rest) {
976 template<
class ...A_>
977 void begindrag(std::string &data, A_&& ... rest) {
982 template<
class ...A_>
983 void begindrag(
char *data, A_&& ... rest) {
990 template<
class D_,
class ...A_>
991 void begindrag(DragSource &source, D_ &&data, A_&& ... rest) {
992 begindrag(source, std::forward<A_>(rest)...);
997 template<
class ...A_>
998 void begindrag(DragSource &source,
const std::string &data, A_&& ... rest) {
999 begindrag(source, std::forward<A_>(rest)...);
1004 template<
class ...A_>
1005 void begindrag(DragSource &source, std::string &data, A_&& ... rest) {
1006 begindrag(source, std::forward<A_>(rest)...);
1011 template<
class ...A_>
1012 void begindrag(DragSource &source,
char *data, A_&& ... rest) {
1013 begindrag(source, std::forward<A_>(rest)...);
1018 template<
class ...A_>
1019 void begindrag(DragSource &source,
const char *data, A_&& ... rest) {
1020 begindrag(source, std::forward<A_>(rest)...);
1034 template<
class ...A_>
1036 begindrag(source, std::forward<A_>(data)...);
1040 if(
sizeof...(data) > 0)
1050 template<
class ...A_>
1056 if(
sizeof...(data) > 0)
1111 throw std::runtime_error(
"No current drag operation is in progress");
This class represents a window.
Definition: Window.h:31
constexpr Type File
File.
Definition: GID.h:84
std::enable_if< decltype(gorgon__enum_tr_loc(T_()))::isupgradedenum, std::string >::type From(const T_ &e)
Definition: Enum.h:303
Atom XdndActionCopy
Definition: X11.h:107
void handledndselectionnotify(XEvent event, Window &wind)
Definition: DnD.cpp:193
This class provides event mechanism.
Definition: Event.h:134
void dotransformandclip(bool inverse=false)
Performs transformation and clipping. Use inverse for reverse mapping for mouse events.
Definition: Layer.cpp:115
Atom XA_Filelist
Definition: X11.h:110
std::string GetEnvVar(const std::string &var)
Returns the value of an environment variable.
Definition: Linux.cpp:17
T_ Width() const
Calculates and returns the width of the bounds.
Definition: Bounds.h:130
Atom XdndLeave
Definition: X11.h:105
constexpr Type Text
Stores text data, no longer a resource.
Definition: GID.h:134
Gorgon::internal::windowdata * getdata(const Window &w)
Definition: Window.cpp:15
Geometry::Bounds Clip
Current clipping size, for mouse and clipping events.
Definition: Layer.cpp:20
Atom XdndSelection
Definition: X11.h:100
bool IsLocalPointer() const
Returns whether the current pointer is a local pointer.
Definition: Window.h:279
T_ Height() const
Calculates and returns the height of the bounds.
Definition: Bounds.h:135
void handledndleave(XEvent, Window &wind)
Definition: DnD.cpp:82
Atom XdndActionMove
Definition: X11.h:108
Atom XA_STRING
Definition: X11.h:72
Atom XA_UTF8_STRING
Definition: X11.h:73
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
void reverttransformandclip()
Reverts previously done transformation.
Definition: Layer.cpp:149
void Clear()
Clears the file list.
Definition: DataExchange.h:86
std::string URIDecode(const std::string &str)
Decodes a given URI string according to RFC 3986. May throw URIError.
Definition: URI.cpp:74
void handledndevent(XEvent event, Window &wind)
Definition: DnD.cpp:312
#define ASSERT(expression, message,...)
Replaces regular assert to allow messages and backtrace.
Definition: Assert.h:161
void handledndenter(XEvent event, Window &wind)
Definition: DnD.cpp:24
Collection is a container for reference typed objects.
Definition: Collection.h:21
basic_Point< int > Point
Definition: Point.h:598
Geometry::Transform3D Transform
Current layer transformation, only for render and mouse.
Definition: Layer.cpp:18
Atom XdndPosition
Definition: X11.h:104
Atom XdndStatus
Definition: X11.h:103
Base object for data to be exchanged.
Definition: DataExchange.h:12
Stores text data for data exchange.
Definition: DataExchange.h:31
Iterator_< T_, Collection > Iterator
Regular iterator.
Definition: Collection.h:134
void AddFile(std::string value)
Adds a new file to the list.
Definition: DataExchange.h:76
This class is the base class for all layer types.
Definition: Layer.h:79
This class represents a 2D point.
Definition: Point.h:32
void SwitchToLocalPointers()
Removes the operating system pointer and starts using Locally defined pointers.
Definition: Window.cpp:222
void handledndposition(XEvent event, Window &wind)
Definition: DnD.cpp:120
Atom XdndTypeList
Definition: X11.h:109
Layer()
Constructor that sets the layer to cover entire parent, no matter how big it is.
Definition: Layer.h:90
Type to store GID information.
Definition: GID.h:23
void handlednddrop(XEvent event, Window &wind)
Definition: DnD.cpp:94
void Add(Layer *l)
Definition: Layer.h:53
Stores list of files for data exchange.
Definition: DataExchange.h:64
Atom XdndDrop
Definition: X11.h:106
Atom XA_PRIMARY
Definition: X11.h:97
void SetText(std::string value)
Changes the text in this data.
Definition: DataExchange.h:36
void SwitchToWMPointers()
Stops showing local pointers and makes window manager pointer visible.
Definition: Window.cpp:228
Atom XdndEnter
Definition: X11.h:101