Skip to content

seb0xff/gtk-grid-board

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gtk-grid-board

Simple grid board widget for gtk4. Some things that can be customized:

  • number of rows and columns (of course)
  • cell radius
  • cell spacing (between cells)
  • colors (cell, grid, background)
  • turn on/off guide lines (and accent lines)

CSS .grid-board #guidelines #cells

Alt Text Alt Text

Requirements

  • C11 compiler
  • meson
  • gtk4
  • git

Build

clone and cd into the directory

meson setup build
cd build
meson compile

Test

meson test --verbose

Install

meson install

Uninstall

ninja uninstall

Usage

Meson

gnt_dep = dependency('gnt-0.1')
e = executable(
...
dependencies: [gnt_dep],
...
)

Cmake

find_package(PkgConfig REQUIRED)
pkg_search_module(gnt REQUIRED IMPORTED_TARGET gnt-0.1>=0.1)

target_link_libraries(... PkgConfig::gnt)

C/C++ It's used like any other gtk widget, just include the header (ggb.h) and create an instance of the widget (GgbGrid). You can take a look at the test file in the root directory.

Python

Python bindings are available and installed by default, there is an example in the examples directory.

Note: At the moment there is no stubs generated, but the api is almost the same as the C api (just look at the header file).

About

Simple grid board implementation for gtk4

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published