ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* fields (widgets) in PDF layer
@ 2006-02-17 16:52 Peter Rolf
  2006-02-17 19:20 ` Hans Hagen
  2006-02-17 19:32 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Rolf @ 2006-02-17 16:52 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

Hi all!

I've searched for an answer some time ago

http://archive.contextgarden.net/message/20051230.132510.4dba9fed.en.html

Meanwhile I've solved the problem and the solution is quite simple. Only
some minor changes are needed, to bound the state of fields to the state
of their surrounding PDF layer. I attached a 'small' example file and
two diff files for patching.

So what is this good for? For example think about multilayered control
fields (stack), which appear in the form of a tabular box (one tab
active at a time). Every tab can contain any kind of interactive field.
No more mouse interaction (and ugly gfx glitches) with hidden fields, if
the surrounding PDF layer is switched off.

To Hans:
- Dunno if the name \currentPDFlayer is o.k., or if there is a better
place for it's (re)initialisation.
- The fields are still active (only hidden), if the outer layer is
deactivated (nested). Is the outer layer not part of the child layers
OCMG? Reading the PDF reference manual is much harder than reading your
sources...
So it's up to you, if and how this is added.

Greetings,

Peter

[-- Attachment #2: test.zip --]
[-- Type: application/x-zip-compressed, Size: 3314 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fields (widgets) in PDF layer
  2006-02-17 16:52 fields (widgets) in PDF layer Peter Rolf
@ 2006-02-17 19:20 ` Hans Hagen
  2006-02-17 21:14   ` Peter Rolf
  2006-02-17 19:32 ` Hans Hagen
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-02-17 19:20 UTC (permalink / raw)


Peter Rolf wrote:
> Hi all!
>
> I've searched for an answer some time ago
>
> http://archive.contextgarden.net/message/20051230.132510.4dba9fed.en.html
>
> Meanwhile I've solved the problem and the solution is quite simple. Only
> some minor changes are needed, to bound the state of fields to the state
> of their surrounding PDF layer. I attached a 'small' example file and
> two diff files for patching.
>
> So what is this good for? For example think about multilayered control
> fields (stack), which appear in the form of a tabular box (one tab
> active at a time). Every tab can contain any kind of interactive field.
> No more mouse interaction (and ugly gfx glitches) with hidden fields, if
> the surrounding PDF layer is switched off.
>   
So what you propose is to have an automatic relationship between layers 
and widgets?
> To Hans:
> - Dunno if the name \currentPDFlayer is o.k., or if there is a better
> place for it's (re)initialisation.
> - The fields are still active (only hidden), if the outer layer is
> deactivated (nested). Is the outer layer not part of the child layers
> OCMG? Reading the PDF reference manual is much harder than reading your
> sources...
> So it's up to you, if and how this is added.
>   
What you do basically comes down to having a default connection between the layers key of widgets and the current layer. This is ok but need to be a configurable feature. I'll think about it. 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fields (widgets) in PDF layer
  2006-02-17 16:52 fields (widgets) in PDF layer Peter Rolf
  2006-02-17 19:20 ` Hans Hagen
@ 2006-02-17 19:32 ` Hans Hagen
  2006-02-17 21:29   ` Peter Rolf
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-02-17 19:32 UTC (permalink / raw)


Peter Rolf wrote:
> - Dunno if the name \currentPDFlayer is o.k., or if there is a better
> place for it's (re)initialisation.
>   
\let\currentlayerproperty\empty

\def\startlayerproperty
  {\let\currentlayerproperty\currentproperty
   \dostartviewerlayer\currentproperty}

\def\stoplayerproperty
  {\dostopviewerlayer
   \let\currentlayerproperty\previousproperty}

i don't want PDF related naming in the core modules (after all, one 
never knows what other backends will show up)
> - The fields are still active (only hidden), if the outer layer is
> deactivated (nested). Is the outer layer not part of the child layers
> OCMG? Reading the PDF reference manual is much harder than reading your
> sources...
>   
-)
> So it's up to you, if and how this is added.
>   
btw, a nice example, this tabbing thing, maybe make a MyWay or wiki entry of if some day. 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fields (widgets) in PDF layer
  2006-02-17 19:20 ` Hans Hagen
@ 2006-02-17 21:14   ` Peter Rolf
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Rolf @ 2006-02-17 21:14 UTC (permalink / raw)


Hans Hagen wrote:
> Peter Rolf wrote:
>> Hi all!
>>
>> I've searched for an answer some time ago
>>
>> http://archive.contextgarden.net/message/20051230.132510.4dba9fed.en.html
>>
>> Meanwhile I've solved the problem and the solution is quite simple. Only
>> some minor changes are needed, to bound the state of fields to the state
>> of their surrounding PDF layer. I attached a 'small' example file and
>> two diff files for patching.
>>
>> So what is this good for? For example think about multilayered control
>> fields (stack), which appear in the form of a tabular box (one tab
>> active at a time). Every tab can contain any kind of interactive field.
>> No more mouse interaction (and ugly gfx glitches) with hidden fields, if
>> the surrounding PDF layer is switched off.
>>   
> So what you propose is to have an automatic relationship between layers 
> and widgets?

yes. everything between a \startproperty[layer] and \stopproperty
belongs to this layer. if the layer is deactivated, everything should
not only be hidden but also be inactive. this is the only way to stack
layers with interactive elements.

>> To Hans:
>> - Dunno if the name \currentPDFlayer is o.k., or if there is a better
>> place for it's (re)initialisation.
>> - The fields are still active (only hidden), if the outer layer is
>> deactivated (nested). Is the outer layer not part of the child layers
>> OCMG? Reading the PDF reference manual is much harder than reading your
>> sources...
>> So it's up to you, if and how this is added.
>>   
> What you do basically comes down to having a default connection between the layers key of widgets and the current layer. This is ok but need to be a configurable feature. I'll think about it. 
> 
o.k. thx.

> Hans 
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: fields (widgets) in PDF layer
  2006-02-17 19:32 ` Hans Hagen
@ 2006-02-17 21:29   ` Peter Rolf
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Rolf @ 2006-02-17 21:29 UTC (permalink / raw)


Hans Hagen wrote:
> Peter Rolf wrote:
>> - Dunno if the name \currentPDFlayer is o.k., or if there is a better
>> place for it's (re)initialisation.
>>   
> \let\currentlayerproperty\empty
> 
> \def\startlayerproperty
>   {\let\currentlayerproperty\currentproperty
>    \dostartviewerlayer\currentproperty}
> 
> \def\stoplayerproperty
>   {\dostopviewerlayer
>    \let\currentlayerproperty\previousproperty}
> 
> i don't want PDF related naming in the core modules (after all, one 
> never knows what other backends will show up)
>> - The fields are still active (only hidden), if the outer layer is
>> deactivated (nested). Is the outer layer not part of the child layers
>> OCMG? Reading the PDF reference manual is much harder than reading your
>> sources...
>>   
> -)
>> So it's up to you, if and how this is added.
>>   
> btw, a nice example, this tabbing thing, maybe make a MyWay or wiki entry of if some day. 
>
no problem.

the final (non minimal) version will have radio based tab-buttons to
switch between the active layer. when it's done, i'll add it to the wiki.

peter

> Hans 
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-02-17 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-17 16:52 fields (widgets) in PDF layer Peter Rolf
2006-02-17 19:20 ` Hans Hagen
2006-02-17 21:14   ` Peter Rolf
2006-02-17 19:32 ` Hans Hagen
2006-02-17 21:29   ` Peter Rolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).