From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA06093; Fri, 17 Oct 2003 12:13:25 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA03194 for ; Fri, 17 Oct 2003 12:13:24 +0200 (MET DST) Received: from charpentier.inria.fr (charpentier.inria.fr [128.93.12.16]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h9HADN104826; Fri, 17 Oct 2003 12:13:23 +0200 (MET DST) Received: (from rouanet@localhost) by charpentier.inria.fr (8.11.1/8.11.1) id h9HADNW13193; Fri, 17 Oct 2003 12:13:23 +0200 From: Arnaud Rouanet MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16271.49347.286598.76552@charpentier.inria.fr> Date: Fri, 17 Oct 2003 12:13:23 +0200 To: caml-list@inria.fr CC: julien.forget@inria.fr Subject: [Caml-list] Camltk: missing State Hidden constructor X-Mailer: VM 7.17 under Emacs 21.2.4 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; developping:01 gui:01 vertices:01 scaling:01 dynamically:01 ocaml:01 ocaml:01 configure:02 precisely:02 arnaud:03 arnaud:03 constructor:03 constructor:03 library:03 trick:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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