]> git.lyx.org Git - lyx.git/blobdiff - src/combox.h
white-space changes, removed definitions.h several enum changes because of this,...
[lyx.git] / src / combox.h
index e0683ef7d110f642fe086a5c3cd16a5833fcd8a8..fb32d648be34a185c2671619c20ce4f28f2d1b64 100644 (file)
  *    and support for middle and right buttons, as XForms choice object.
  */ 
 
-#ifndef _COMBOX_H_
-#define _COMBOX_H_
+#ifndef COMBOX_H
+#define COMBOX_H
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
 #include FORMS_H_LOCATION
-#include <stdlib.h>
+#include <cstdlib>
 
 ///
 enum combox_type {
@@ -51,7 +51,7 @@ typedef void (*FL_COMBO_PRE_POST) ();
 class Combox {
 public:
        ///
-       Combox(combox_type t=FL_COMBOX_NORMAL);
+       Combox(combox_type t = FL_COMBOX_NORMAL);
        ///
        ~Combox();
 
@@ -107,6 +107,12 @@ public:
        void Redraw();
        ///
        void Show();
+       ///
+       static void combo_cb(FL_OBJECT *, long);
+       ///
+       static void input_cb(FL_OBJECT *, long);
+       ///
+        static int  peek_event(FL_FORM *, void *);
  protected:
         /// At least Hide should not be public
        void Hide(int who = 0);
@@ -122,12 +128,6 @@ public:
        ///
        bool is_empty;
        ///
-       static void combo_cb(FL_OBJECT *, long);
-       ///
-       static void input_cb(FL_OBJECT *, long);
-       ///
-        static int  peek_event(FL_FORM *, void *);
-       ///
        FL_COMBO_CB callback;
        ///
        void *cb_arg;
@@ -160,25 +160,25 @@ inline
 void Combox::resize(unsigned r)
 {
    fl_set_object_resize(button, r);
-   if (label!=button) fl_set_object_resize(label, r); 
+   if (label!= button) fl_set_object_resize(label, r); 
 }
 
 inline
 void Combox::gravity(unsigned g1, unsigned g2)
 {
    fl_set_object_gravity(button, g1, g2);
-   if (label!=button) fl_set_object_gravity(label, g1, g2); 
+   if (label!= button) fl_set_object_gravity(label, g1, g2); 
 }
 
 inline
 void Combox::shortcut(char const* s, int i)
 {
    if (button)
-      fl_set_object_shortcut(button,s,i);
+      fl_set_object_shortcut(button, s, i);
 }
 
 inline
-void Combox::setcallback(FL_COMBO_CB cb, void *a = NULL)
+void Combox::setcallback(FL_COMBO_CB cb, void *a = 0)
 {
    callback = cb;
    cb_arg = a;
@@ -205,10 +205,10 @@ int Combox::get()
 inline
 char const*Combox::getline()
 {
-    if (type==FL_COMBOX_INPUT) 
+    if (type == FL_COMBOX_INPUT) 
       return fl_get_input(label);
     else
-      return ((browser) ? fl_get_browser_line(browser, sel): (char const*)NULL);
+      return ((browser) ? fl_get_browser_line(browser, sel): (char const*)0);
 }
 
 #endif