GithubHelp home page GithubHelp logo

Comments (6)

deech avatar deech commented on May 26, 2024

Hi!
Unfortunately Tables are not supported from Fluid because they are a very low level widget that require you to override its draw function. Fl_Tree is like that too. I wish they were supported. You can add a custom table to the main window's group from whatever function is using the Fluid module if you want.
HTH

from fltkhs.

dixie avatar dixie commented on May 26, 2024

Hi!

Actually I would like to use in my application that two widgets - Tree and Table :) + some menus.
I'm not sure if I understood your suggestion. Is it an approach, which is used in Tree.fl example from fltkhs-fluid-demos? There are many other widgets in that demo code and I'm little bit lost what is exactly essential for working Tree widget. Maybe I need to study a code more till I get a better understanding of fluid/fltkhs interworking.

dixie

from fltkhs.

dixie avatar dixie commented on May 26, 2024

I read the documentation for fltkhs again, and I understood. So it is possible to combine fluid generated code with manually written. I'll try to do that.

from fltkhs.

dixie avatar dixie commented on May 26, 2024

minor update related to the topic: in the end I'm using fltkhs without fluid. I was little bit afraid of writting UI-layout directly into code, but it seems to be quite simple with FLTK. Finally I have in the toolbox a GUI library, which is soooooo simple to build on Windows :) Thanks a lot!

from fltkhs.

deech avatar deech commented on May 26, 2024

Glad it's working out for you. Thanks for the feedback!

from fltkhs.

mikeplus64 avatar mikeplus64 commented on May 26, 2024

Could we paramaterise the makeWindow (or whatever name) function by the required callbacks?

e.g. instead of

makeWindow :: IO ()
-- define helper types like these in Graphics.UI.FLTK.Fluid or something
data TableParams = TableParams
  { drawCell :: Ref Table -> TableContext -> TableCoordinate -> Rectangle -> IO ()
  , widgetOverrides :: CustomWidgetFuncs Table
  , tableFuncs :: CustomTableFuncs Table
  }

-- then maybe define some helper-helpers like `showCells :: Show a => Array (Int, Int) a -> TableParams` etc

-- "foo" being the name given to the table in fluid
data WindowInfo = WindowInfo
  { foo :: TableParams
  }

makeWindow :: WindowInfo -> IO ()

from fltkhs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.