From: Tim Cuthbertson <tim@gfxmonk.net>
To: eliot@colba.net
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Adding ttk (tile tk) bindings to labltk
Date: Fri, 4 Oct 2013 22:24:44 +1000 [thread overview]
Message-ID: <CAC-LLDjReFEgSE3UaUan=FmkwAcuWY1w=fr1-7z_Og4bQxbtCw@mail.gmail.com> (raw)
In-Reply-To: <524E0AAD.9000909@colba.net>
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
On Fri, Oct 4, 2013 at 10:24 AM, Eliot Handelman <eliot@colba.net> wrote:
> On 10/03/2013 05:45 AM, Tim Cuthbertson wrote:
>
>>
>> Does anyone know if it's possible to add ttk widgets to labltk? Is there
>> a library other than labltk that I should be using for ttk?
>>
>
> It is for me -- here's how I got LabelFrame going:
>
> open Tk
> open Protocol
>
> let tokenize strings =
> Arr.of_list (L1.map (fun s -> TkToken s) strings)
>
> let tk_command string_list =
> Protocol.tkCommand (tokenize string_list)
>
> let tk_eval string_list =
> Protocol.tkEval (tokenize string_list)
>
> let after ms =
> tk_command [ "after"; string_of_int ms]
>
> module LabelFrame = struct
> let id = ref 0
> let create ?(text = "") top =
> let i = int !id in
> incr id;
> let lf_name = (Widget.name top) ^ ".labelframe" ^ i in
> tk_command
> ["ttk::labelframe"; lf_name;
> "-text"; text
> ];
> Protocol.cTKtoCAMLwidget lf_name
> end
>
> best,
>
> -- eliot
>
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/**arc/caml-list<https://sympa.inria.fr/sympa/arc/caml-list>
> Beginner's list: http://groups.yahoo.com/group/**ocaml_beginners<http://groups.yahoo.com/group/ocaml_beginners>
> Bug reports: http://caml.inria.fr/bin/caml-**bugs<http://caml.inria.fr/bin/caml-bugs>
>
Thanks, Eliot.
It's good to know this is possible, but I was thinking more of extending
labltk itself to provide / generate these bindings - I don't much fancy
writing wrappers like this for each function / widget I want to use.
Cheers,
- Tim.
[-- Attachment #2: Type: text/html, Size: 2535 bytes --]
next prev parent reply other threads:[~2013-10-04 12:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 9:45 Tim Cuthbertson
2013-10-03 11:43 ` ygrek
2013-10-04 0:24 ` Eliot Handelman
2013-10-04 12:24 ` Tim Cuthbertson [this message]
2013-10-04 14:14 ` 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='CAC-LLDjReFEgSE3UaUan=FmkwAcuWY1w=fr1-7z_Og4bQxbtCw@mail.gmail.com' \
--to=tim@gfxmonk.net \
--cc=caml-list@inria.fr \
--cc=eliot@colba.net \
/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