[BLACKBOX] 'unit'

From: Douglas G. Danforth <"Douglas>
Date: Tue, 4 Mar 2008 14:17:42 -0800

----boundary-LibPST-iamunique-1577248615_-_-
Content-type: text/plain

If one has a pointer, f, to a Ports.Frame or Views.Frame then one has access
to f.unit. If one does not have such a pointer then how can one find the
value of the unit?

For example, when implementing HandlePropMsg for MyView which is
an extension of Views.View the specification of size in Properties.SizePref
has the quantities msg.h and msg.w specified in universal units. If I knew
unit this would be trivial but I don't. Am I expected to do some
calculations
based on 1/36000 of a millimeter and pixel size? That sounds like a kludge.
I have not been able to find any module within the BB framework that exports
the value of 'unit'. Only Ports.Frame and Views.Frame export the unit but
embedded in the pointers to a frame.

What must I do to obtain the value of 'unit', or equivalently be able to
specify
sizes in universal units when I think in pixels?

-Doug Danforth


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1577248615_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIElmIG9uZSBoYXMgYSBwb2ludGVyLCBmLCB0byBh
IFBvcnRzLkZyYW1lIG9yIFZpZXdzLkZyYW1lIHRoZW4gb25lIGhhcyBhY2Nlc3NccGFyDQp0byBm
LnVuaXQuICBJZiBvbmUgZG9lcyBub3QgaGF2ZSBzdWNoIG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NhbCB1bml0cyB3aGVuIEkgdGhpbmsgaW4gcGl4
ZWxzP1xwYXINClxwYXINCi1Eb3VnIERhbmZvcnRoXHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXIN
ClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tC
T1giIHRvIExJU1RTRVJWQExJU1RTLk9CRVJPTi5DSH19AEVDSVA=
----boundary-LibPST-iamunique-1577248615_-_---
Received on Tue Mar 04 2008 - 23:17:42 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:59 UTC