Like Tree3Likes

Try the free C++ GUI library for your hobby project.

This is a discussion on Try the free C++ GUI library for your hobby project. within the Projects and Job Recruitment forums, part of the Community Boards category; Try the Nana C++ Library for your hobby project. It's free and open-source. This is a pure C++ library written ...

  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    127

    Try the free C++ GUI library for your hobby project.

    Try the Nana C++ Library for your hobby project. It's free and open-source.

    This is a pure C++ library written in standard C++, it makes you create a GUI program faster through HAND-CODING
    manasij7479 and Salem like this.
    Nana C++ Library is a GUI framework that designed to be C++ style, cross-platform and easy-to-use.

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    What does it do better than Qt?

  3. #3
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,490
    Quote Originally Posted by cyberfish View Post
    What does it do better than Qt?
    I think, from the examples, the keyword is 'simple' .
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    Ah! Like a not-ugly version of FLTK. That would be great actually. Qt has a fairly steep learning curve.

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    127
    Quote Originally Posted by cyberfish View Post
    What does it do better than Qt?
    I have not used Qt - -!
    Qt is very powerful, Nana is lightweight.
    Qt has its own syntax, Nana uses standard C++.

    In fact, the main aim of Nana is providing comman concepts for programming, it should not break your thought and architecture of your design, thread-safe and thread-free features can make happy programming.

    This is a pure C++ library, so lambda works if compiler is allowed.

    Code:
    #include <nana/gui/wvl.hpp>
    #include <iostream>
    int main()
    {
        using namespace nana::gui;
    
        form fm;
        fm.make_event<events::click>(
                []{ std::cout<<"Hello, World"<<std::endl; }
            );
        fm.show();
        exec();
    }
    Output "hello,world" if you click on the form.
    Last edited by jinhao; 12-08-2011 at 10:56 PM.
    Nana C++ Library is a GUI framework that designed to be C++ style, cross-platform and easy-to-use.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    The reason Qt went with their own syntax (signals and slots) was because they thought, the way everyone else was doing it, with event callbacks (I haven't looked into your library, so I don't know if you are using that), was too un-intuitive. The whole point of the signals and slots system was to make it more intuitive, and more OO.

  7. #7
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,490
    Quote Originally Posted by cyberfish View Post
    The reason Qt went with their own syntax (signals and slots) was because they thought, the way everyone else was doing it, with event callbacks (I haven't looked into your library, so I don't know if you are using that), was too un-intuitive. The whole point of the signals and slots system was to make it more intuitive, and more OO.
    I read that their explanation is "using callbacks overrides the type system for the arguments."
    But I never understood that point...if you use functors instead of function pointers as expected in C++ code,..that does not remain a problem.

    Quote Originally Posted by Qt docs
    . Callbacks have two fundamental flaws: Firstly, they are not type-safe. We can never be certain that the processing function will call the callback with the correct arguments. Secondly, the callback is strongly coupled to the processing function since the processing function must know which callback to call.
    The second argument also does not sound very convincing to me....after all, you can just pass objects(or references to them) around for that.
    Last edited by manasij7479; 12-08-2011 at 10:47 PM.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  8. #8
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    I don't think it's just the type system. The callback system assumes that the "interested party" is a function (or functor, which is conceptually a function), instead of an object, which is not OO.

    I'm not really sure about this. UI design is really not my speciality.

  9. #9
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,490
    Quote Originally Posted by cyberfish View Post
    I don't think it's just the type system. The callback system assumes that the "interested party" is a function (or functor, which is conceptually a function), instead of an object, which is not OO.
    ...but a functor IS an object !
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  10. #10
    Registered User
    Join Date
    Aug 2003
    Posts
    127
    Qt says a callback is a pointer to function, but IMO, callback is more like a pattern that is a implememtion of Dependency Injection.
    nowadays, we have function objects.
    Nana C++ Library is a GUI framework that designed to be C++ style, cross-platform and easy-to-use.

  11. #11
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    It is an object, but it doesn't represent a function in the world. It represents an action, a function. It's not REALLY conceptually an object.

  12. #12
    Registered User
    Join Date
    Aug 2003
    Posts
    127
    Functor is not a function, but it can be invoked by function-call syntax. So, we should not take care about whether it is a function, and it is a good solution to be a substitute for pointer to function in a common purpose library/framework.
    Nana C++ Library is a GUI framework that designed to be C++ style, cross-platform and easy-to-use.

  13. #13
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    Or we can also think of them as a function that is defined like an object. I think from places I have seen functors used, that's a more conceptually accurate description. It's not an object that represents something in the world. For example, you wouldn't call a functor Cat. Instead, it would be something like a Comparator, which really represents an operation/function.

    So while that solves the technical problem of type safety, it still isn't conceptually OOP. That's just defining callback functions in another way.

  14. #14
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,490
    Quote Originally Posted by cyberfish View Post
    Or we can also think of them as a function that is defined like an object. I think from places I have seen functors used, that's a more conceptually accurate description. It's not an object that represents something in the world. For example, you wouldn't call a functor Cat. Instead, it would be something like a Comparator, which really represents an operation/function.
    That is only one kind of use for them.
    For example...if you have a class called Computer....its () operator could be appropriately used to start the computer ...
    That doesn't mean that the objects of that class are logically functions.
    Manasij Mukherjee | gcc-4.8.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  15. #15
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    What if it has multiple functions?

    Classic OOP theory says objects should represent "things" with state (properties), and actions (methods).

    If something only does one thing, isn't it a function?

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Paid project - The Free Marketing Project
    By sharefree in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 10-27-2010, 02:15 PM
  2. new license-free lock-free data structure library published
    By Toby Douglass in forum Projects and Job Recruitment
    Replies: 19
    Last Post: 12-22-2009, 01:33 AM
  3. Looking for a hobby? We need everyone we can get!
    By zirgon in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 03-22-2008, 01:06 PM
  4. my free c++ library
    By jinhao in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 11-01-2007, 10:00 PM
  5. A free TIFF to PDF library
    By rockytriton in forum C++ Programming
    Replies: 0
    Last Post: 01-06-2006, 02:22 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21