Comments (6)
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.
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.
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.
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.
Glad it's working out for you. Thanks for the feedback!
from fltkhs.
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)
- Return function pointer from `openCallback` so it can be freed. HOT 1
- Crash in FL.eventKey on special key HOT 8
- GL causes c2hs error on Mac due to missing type HOT 4
- after using setIcon on window it doesn't display application HOT 4
- Adding a Scrolled via FLUID generates wrong "scrollNew" call instead of "scrolledNew" HOT 1
- How to enable modern OpenGL? HOT 11
- unable to run basic example under nix HOT 1
- Fltkhs as stack dependency linking error on Windows 10 HOT 1
- install gotchas
- Build error in Setup.hs HOT 2
- Error building bundled fltkhs in custom Setup.hs HOT 1
- fltkhs-fluidtohs generates incorrect module names for nested modules
- addAndGetMenuItem is suprisingly slow HOT 8
- How to call findClicked?
- GHC 8.10.3 linking issue HOT 1
- Syntax error while installing with bundled fltkhs HOT 1
- Build fails with autoconf 2.70 and up HOT 8
- New branch's build artifacts stored in /tmp get erased
- Updating for base-4.14 (ghc 8.10) HOT 2
- cabal-install 3.4.0.0 breaks installation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fltkhs.