LablGtk is an OCaml interface to GTK+ 1.2, 2.x, and 3.x.
Questions tagged [lablgtk]
23 questions
                    
                    4
                    
            votes
                
                0 answers
            
        Integrating GTK and Lwt
I am working on a program in which I would like to use lablgtk and lwt. I have functions fetching data on lwt threads, then I would like to display the data in a GUI using lablgtk. I am struggling with the integration of lablgtk in the lwt…
        
        Thomas
        
- 347
 - 3
 - 19
 
                    4
                    
            votes
                
                2 answers
            
        How do I read this OCaml type signature?
I'm currently experimenting with using OCaml and GTK together (using the lablgtk bindings).  However, the documentation isn't the best, and while I can work out how to use most of the features, I'm stuck with changing notebook pages (switching to a…
        
        a_m0d
        
- 12,034
 - 15
 - 57
 - 79
 
                    3
                    
            votes
                
                1 answer
            
        lablgtk can't find gtk+ 2.0 on Mac
I want to install lablgtk on my mac to use some software who needs it. I try to install it with opam install lablgtk but at the make world I got this error :
=> This package requires gtk+ 2.0 development packages installed on your system
=> To solve…
        
        Jack
        
- 405
 - 4
 - 11
 
                    3
                    
            votes
                
                1 answer
            
        Capturing clicks in label_widget in expander (lablgtk)
In lablgtk, I have an Expander widget to which I added a button as part of its label, as in this picture:
However, I'm unable to capture clicks to this button, since all of them seem to be captured by the Expander object itself.
I even tried adding…
        
        anol
        
- 8,264
 - 3
 - 34
 - 78
 
                    2
                    
            votes
                
                1 answer
            
        Gtk3 `set_fixed_height_from_font` does not produce cells of correct height
I am trying to make a tree view in Gtk3 such that each row has the size of two rows of text. The following is a minimal working example:
#include 
int main(int argc, char *argv[]) {
  GtkWidget *window;
  gtk_init(&argc, &argv);
  window… 
        
        Couchy
        
- 753
 - 1
 - 5
 - 25
 
                    2
                    
            votes
                
                0 answers
            
        Issue when installing lablgtk with opam
I'l trying to install a package (https://github.com/SchornacklabSLCU/amfinder) that use opam to install several libraries. However, two libraries failed to install: lablgtk and cairo2-gtk.I tried to install these two directly via opam (opam install…
        
        alr
        
- 21
 - 1
 
                    2
                    
            votes
                
                1 answer
            
        Detecting a Ctrl+click event in lablgtk
This question explains how to detect a ctrl+click in pygtk.
Does it also work on Lablgtk? Or is there a simpler way to do it?
        
        anol
        
- 8,264
 - 3
 - 34
 - 78
 
                    2
                    
            votes
                
                1 answer
            
        Difference between Gdk.Window, GtkWindow and GWindow in lablgtk
In Lablgtk, there are (at least) three types of window-named modules:
Gdk.Window
GtkWindow
GWindow
What's the difference between them, and how can I go from one to another?
        
        anol
        
- 8,264
 - 3
 - 34
 - 78
 
                    2
                    
            votes
                
                0 answers
            
        Is there a terminal widget compatible with lablgtk?
Good morning,
I'm implementing a software in labgtk and I'd like to embed a terminal-like widget in the interface, similarly the terminal embedded in gedit (example:…
        
    
                    2
                    
            votes
                
                1 answer
            
        How to create a GTK plugin (cmxs) for my OCaml program
I'd like to make a GTK plugin for my OCaml application, loaded using Dynlink. How can I get ocamlbuild to include the lablgtk2 library in the generated plugin?
As a test, I have main.ml:
let () =
  try
    Dynlink.loadfile "_build/gtk_plugin.cmxs"
 …
        
        Thomas Leonard
        
- 7,068
 - 2
 - 36
 - 40
 
                    2
                    
            votes
                
                3 answers
            
        OCaml + LablGTK2: Multi-Line Text Box
I am trying to figure out how to instantiate a multi-line text box inside a graphical widget.  LablGTK2 appears to be quite limited in terms of documentation and the API is scarce for the things that start to look like what I want.  
I have started…
        
        9codeMan9
        
- 802
 - 6
 - 11
 - 25
 
                    1
                    
            vote
                
                2 answers
            
        Unable to build a program using lablgtk2 with jbuilder
I would like to use jbuilder when compiling with lablgtk2 but I am having problems getting these error messages:
File "_none_", line 1:
Error: No implementations provided for the following modules:
         Thread referenced from…
        
        Hadil Sabbagh
        
- 23
 - 2
 
                    1
                    
            vote
                
                1 answer
            
        Linking OCaml Record with its GUI representation
I have this record type.
   type cell = { alive : bool ; column : int ; row : int }
   ;;
Now I create a grid of such cells.
    #require "containers";;
   let makegrid = CCList.init 2 ( fun i -> (CCList.init 2 (fun j -> { alive = true; column =…
        
        Mohan Radhakrishnan
        
- 3,002
 - 5
 - 28
 - 42
 
                    1
                    
            vote
                
                1 answer
            
        Lablgtk motion_notify event doesn't work
I want to implement drawing area that responds with some action when the mouse click within area. So i connected to motion_notify event, but nothing happen when mouse button is clicked.
Here is example code:
File graph.ml
open GObj
class…
        
        igorr
        
- 141
 - 8
 
                    1
                    
            vote
                
                1 answer
            
        How to handle return types with multiple fields
I am calling a method "get_text" on GText.buffer detailed here http://oandrieu.nerim.net/ocaml/lablgtk/doc/GText.buffer.html
let text = textView#buffer#get_text in
However as get_text returns multiple values, when I try to use my variable "text" as…
        
        user1959309
        
- 101
 - 1
 - 11