… | |
… | |
845 | Anything that didn't fit any of the other categories, even after applying |
845 | Anything that didn't fit any of the other categories, even after applying |
846 | force and closing our eyes. |
846 | force and closing our eyes. |
847 | |
847 | |
848 | =over 4 |
848 | =over 4 |
849 | |
849 | |
850 | =item once { ... } |
850 | =item keep { ... } |
851 | |
851 | |
|
|
852 | #TODO# |
|
|
853 | |
852 | This function takes a code block as argument, that is, one or more |
854 | This operator takes a code block as argument, that is, one or more |
853 | statements enclosed by braces. |
855 | statements enclosed by braces. |
854 | |
856 | |
855 | The trick is that this code block is only evaluated once - future calls |
857 | The trick is that this code block is only evaluated once - future calls |
856 | will simply return the original image (yes, it should only be used with |
858 | will simply return the original image (yes, it should only be used with |
857 | images). |
859 | images). |
… | |
… | |
865 | C<once> block so it only is reevaluated as required. |
867 | C<once> block so it only is reevaluated as required. |
866 | |
868 | |
867 | Putting the blur into a C<once> block will make sure the blur is only done |
869 | Putting the blur into a C<once> block will make sure the blur is only done |
868 | once: |
870 | once: |
869 | |
871 | |
870 | rootlign once { blur 10, root } |
872 | rootlign keep { blur 10, root } |
871 | |
873 | |
872 | This leaves the question of how to force reevaluation of the block, |
874 | This leaves the question of how to force reevaluation of the block, |
873 | in case the root background changes: If expression inside the block |
875 | in case the root background changes: If expression inside the block |
874 | is sensitive to some event (root background changes, window geometry |
876 | is sensitive to some event (root background changes, window geometry |
875 | changes), then it will be reevaluated automatically as needed. |
877 | changes), then it will be reevaluated automatically as needed. |