Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Arnaud Rouanet <arnaud.rouanet@inria.fr>
To: caml-list@inria.fr
Cc: julien.forget@inria.fr
Subject: [Caml-list] Camltk: missing State Hidden constructor
Date: Fri, 17 Oct 2003 12:13:23 +0200	[thread overview]
Message-ID: <16271.49347.286598.76552@charpentier.inria.fr> (raw)

Hi all,

We are developping an application (SynDEx at INRIA Rocquencourt) with
Ocaml and the Camltk library for the GUI.

In our software, the content of one of the windows, more precisely the
elements in the main canvas of the window, is automatically scaled
when the user resizes the window.  The canvas contains several "text
vertices", which consist in text overlaping a rectangle, created by
Canvas.create_text, Canvas.create_rectangle.  Initially, the rectangle
is approximately the bounding box of the text.

When scaling, for each text vertex, the rectangle is scaled down and
may become too small to contain the text, as the text itself is not
scaled.  Therefore, when the rectangle becomes too small, we want to
make the text disappear, and when it becomes big enough, make it
reappear.

We wanted to use Canvas.configure_text, which accepts an State state
option, where state may only be Active | Normal | Disabled. We checked
the Tcl/Tk documentation and there is an additional "hidden" state
since version 8.3, which would be perfect for our purpose but this
doesn't appear in the current Camltk version.  It seems the previous
developper used a trick for this: in his modified version of Camltk,
the constructor Hidden has been added and then everything just works
fine.

However, we are now working with other universities and we would like
to use the standard distribution of Ocaml, which contains CamlTk (but
without the Hidden constructor).  This would also make it easier for
us to upgrade to new versions of Ocaml.

Therefore, we would like to know if there is another way to
dynamically hide the text, using the standard Camltk distribution.  It
is rather strange that the State Hidden constructor is not available
in Camltk.  Is there a good reason for this ?

Thanks for hints,

-- 
Julien Forget
Arnaud Rouanet

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2003-10-17 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-17 10:13 Arnaud Rouanet [this message]
2003-10-21  1:38 ` Jacques Garrigue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16271.49347.286598.76552@charpentier.inria.fr \
    --to=arnaud.rouanet@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=julien.forget@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox