Class: PLplot::GraphicsIn
- Inherits:
-
Object
- Object
- PLplot::GraphicsIn
- Defined in:
- ext/rbplplot.c
Instance Method Summary collapse
-
#button ⇒ Integer
Gets mouse button selected.
-
#dx ⇒ Float
(also: #dX)
Gets relative device x coordinate of pointer.
-
#dy ⇒ Float
(also: #dY)
Gets relative device y coordinate of pointer.
-
#inspect ⇒ String
Returns a human readable string showing all attributes.
-
#keystr ⇒ nil, String
Gets keysym as a String if it is a printable character.
-
#keysym ⇒ Integer
Gets key selected.
-
#px ⇒ Integer
(also: #pX)
Gets absolute device x coordinate of pointer.
-
#py ⇒ Integer
(also: #pY)
Gets absolute device y coordinate of pointer.
-
#state ⇒ Integer
Gets key or button mask.
-
#string ⇒ String
Gets translated string.
-
#subwindow ⇒ Integer
Gets subwindow (or subpage / subplot) number.
-
#type ⇒ Integer
Gets type of event (currently unused?).
-
#wx ⇒ Float
(also: #wX)
Gets world x coordinate of pointer.
-
#wy ⇒ Float
(also: #wY)
Gets world y coordinate of pointer.
Instance Method Details
#button ⇒ Integer
Gets mouse button selected.
4284 4285 4286 4287 4288 4289 4290 |
# File 'ext/rbplplot.c', line 4284 static VALUE (VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return UINT2NUM(p->); } |
#dx ⇒ Float Also known as: dX
Gets relative device x coordinate of pointer.
4340 4341 4342 4343 4344 4345 4346 |
# File 'ext/rbplplot.c', line 4340 static VALUE rb_cPLGraphicsIn_dx(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return rb_float_new(p->dX); } |
#dy ⇒ Float Also known as: dY
Gets relative device y coordinate of pointer.
4354 4355 4356 4357 4358 4359 4360 |
# File 'ext/rbplplot.c', line 4354 static VALUE rb_cPLGraphicsIn_dy(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return rb_float_new(p->dY); } |
#inspect ⇒ String
Returns a human readable string showing all attributes.
4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 |
# File 'ext/rbplplot.c', line 4406 static VALUE rb_cPLGraphicsIn_inspect(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); char s[1000]; /* more than enough */ sprintf(s, "#<PLGraphicsIn: " "type=%d, state=0x%04x, keysym=%d, button=%d, subwindow=%d, " "p=(%d,%d), d=(%.3f,%.3f), w=(%.3f,%.3f)>", p->type, p->state, p->keysym, p->, p->subwindow, p->pX, p->pY, p->dX, p->dY, p->wX, p->wY); return rb_str_new2(s); } |
#keystr ⇒ nil, String
Gets keysym as a String if it is a printable character.
4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 |
# File 'ext/rbplplot.c', line 4429 static VALUE rb_cPLGraphicsIn_keystr(VALUE self) { VALUE val = Qnil; char c; PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); if(ISPRINT(p->keysym)) { c = (char)p->keysym; val = rb_str_new(&c, 1); } return val; } |
#keysym ⇒ Integer
Gets key selected.
4270 4271 4272 4273 4274 4275 4276 |
# File 'ext/rbplplot.c', line 4270 static VALUE rb_cPLGraphicsIn_keysym(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return UINT2NUM(p->keysym); } |
#px ⇒ Integer Also known as: pX
Gets absolute device x coordinate of pointer.
4312 4313 4314 4315 4316 4317 4318 |
# File 'ext/rbplplot.c', line 4312 static VALUE rb_cPLGraphicsIn_px(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return INT2NUM(p->pX); } |
#py ⇒ Integer Also known as: pY
Gets absolute device y coordinate of pointer.
4326 4327 4328 4329 4330 4331 4332 |
# File 'ext/rbplplot.c', line 4326 static VALUE rb_cPLGraphicsIn_py(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return INT2NUM(p->pY); } |
#state ⇒ Integer
Gets key or button mask.
4256 4257 4258 4259 4260 4261 4262 |
# File 'ext/rbplplot.c', line 4256 static VALUE rb_cPLGraphicsIn_state(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return UINT2NUM(p->state); } |
#string ⇒ String
Gets translated string.
4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 |
# File 'ext/rbplplot.c', line 4451 static VALUE rb_cPLGraphicsIn_string(VALUE self) { int i; PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); for(i=0; i<PL_MAXKEY; i++) { if(p->string[i] == '\0') break; } return rb_str_new(p->string, i); } |
#subwindow ⇒ Integer
Gets subwindow (or subpage / subplot) number.
4298 4299 4300 4301 4302 4303 4304 |
# File 'ext/rbplplot.c', line 4298 static VALUE rb_cPLGraphicsIn_subwindow(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return INT2NUM(p->subwindow); } |
#type ⇒ Integer
Gets type of event (currently unused?).
4242 4243 4244 4245 4246 4247 4248 |
# File 'ext/rbplplot.c', line 4242 static VALUE rb_cPLGraphicsIn_type(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return INT2NUM(p->type); } |
#wx ⇒ Float Also known as: wX
Gets world x coordinate of pointer.
4368 4369 4370 4371 4372 4373 4374 |
# File 'ext/rbplplot.c', line 4368 static VALUE rb_cPLGraphicsIn_wx(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return rb_float_new(p->wX); } |
#wy ⇒ Float Also known as: wY
Gets world y coordinate of pointer.
4382 4383 4384 4385 4386 4387 4388 |
# File 'ext/rbplplot.c', line 4382 static VALUE rb_cPLGraphicsIn_wy(VALUE self) { PLGraphicsIn *p; Data_Get_Struct(self, PLGraphicsIn, p); return rb_float_new(p->wY); } |