]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/list.h
Add API declarations
[libs/gltk.git] / source / list.h
index 1de05f6490b840b06193e9fa4f7ba133fb258dce..68a96bf36cb65fb0c9361a0b1a156984cc1cd12f 100644 (file)
@@ -7,7 +7,8 @@
 #include "container.h"
 #include "label.h"
 #include "listdata.h"
-#include "vslider.h"
+#include "mspgltk_api.h"
+#include "slider.h"
 
 namespace Msp {
 namespace GLtk {
@@ -15,7 +16,7 @@ namespace GLtk {
 /**
 Thrown if a list's item type is incompatible with its data.
 */
-class incompatible_data: public std::logic_error
+class MSPGLTK_API incompatible_data: public std::logic_error
 {
 public:
        incompatible_data(const std::type_info &);
@@ -27,7 +28,7 @@ public:
 Shows a list of items, allowing the user to select one.  A slider is included
 to allow scrolling through a long list.
 */
-class List: virtual public Widget, private Container
+class MSPGLTK_API List: virtual public Widget, private Container
 {
 public:
        enum ViewMode
@@ -61,8 +62,11 @@ private:
        };
 
 public:
-       class Item: public Container
+       class Item: virtual public Widget, protected Container
        {
+       protected:
+               Item();
+
        public:
                virtual const char *get_class() const { return "listitem"; }
 
@@ -76,17 +80,20 @@ public:
 
        class SimpleItem: public Item
        {
-       private:
+       protected:
+               SimpleItem() { }
+
                virtual void on_style_change();
        };
 
        class MultiColumnItem: public Item
        {
        protected:
+               MultiColumnItem() { }
+
                virtual void check_widths(std::vector<unsigned> &) const;
                virtual void set_widths(const std::vector<unsigned> &);
 
-       private:
                virtual void on_style_change();
        };
 
@@ -240,7 +247,7 @@ private:
        static void adjust_index(int &, int, int);
 };
 
-void operator>>(const LexicalConverter &, List::ViewMode &);
+MSPGLTK_API void operator>>(const LexicalConverter &, List::ViewMode &);
 
 } // namespace GLtk
 } // namespace Msp