jadjustmentevent.h   jadjustmentevent.h 
skipping to change at line 79 skipping to change at line 79
/** /**
* \brief * \brief
* *
*/ */
virtual ~AdjustmentEvent(); virtual ~AdjustmentEvent();
/** /**
* \brief * \brief
* *
*/ */
double GetValue(); virtual double GetValue();
/** /**
* \brief * \brief
* *
*/ */
jadjustment_type_t GetType(); virtual jadjustment_type_t GetType();
}; };
} }
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 janimation.h   janimation.h 
skipping to change at line 75 skipping to change at line 75
/** /**
* \brief * \brief
* *
*/ */
virtual ~Animation(); virtual ~Animation();
/** /**
* \brief * \brief
* *
*/ */
void AddImage(std::string file); virtual void AddImage(std::string file);
/** /**
* \brief * \brief
* *
*/ */
void SetInterval(int i); virtual void SetInterval(int i);
/** /**
* \brief * \brief
* *
*/ */
void RemoveAll(); virtual void RemoveAll();
/** /**
* \brief * \brief
* *
*/ */
void Release(); virtual void Release();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetVisible(bool b); virtual void SetVisible(bool b);
/** /**
* \brief * \brief
* *
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 jborderlayout.h   jborderlayout.h 
skipping to change at line 90 skipping to change at line 90
/** /**
* \brief * \brief
* *
*/ */
virtual ~BorderLayout(); virtual ~BorderLayout();
/** /**
* \brief * \brief
* *
*/ */
int GetHGap(); virtual int GetHGap();
/** /**
* \brief * \brief
* *
*/ */
int GetVGap(); virtual int GetVGap();
/** /**
* \brief * \brief
* *
*/ */
void SetHGap(int hgap); virtual void SetHGap(int hgap);
/** /**
* \brief * \brief
* *
*/ */
void SetVgap(int vgap); virtual void SetVgap(int vgap);
/** /**
* \brief * \brief
* *
*/ */
void AddLayoutComponent(Component *c, jborderlayout_align_t align); virtual void AddLayoutComponent(Component *c, jborderlayout_ align_t align);
/** /**
* \brief * \brief
* *
*/ */
void RemoveLayoutComponent(Component *c); virtual void RemoveLayoutComponent(Component *c);
/** /**
* \brief * \brief
* *
*/ */
void RemoveLayoutComponents(); virtual void RemoveLayoutComponents();
/** /**
* \brief * \brief
* *
*/ */
jborderlayout_align_t GetConstraints(Component *c); virtual jborderlayout_align_t GetConstraints(Component *c);
/** /**
* \brief * \brief
* *
*/ */
Component * GetLayoutComponent(jborderlayout_align_t align); virtual Component * GetLayoutComponent(jborderlayout_align_t align);
/** /**
* \brief * \brief
* *
*/ */
Component * GetLayoutComponent(Container *target, jborderlay out_align_t align); virtual Component * GetLayoutComponent(Container *target, jb orderlayout_align_t align);
/** /**
* \brief * \brief
* *
*/ */
Component * GetChild(jborderlayout_align_t key, bool ltr); virtual Component * GetChild(jborderlayout_align_t key, bool ltr);
/** /**
* \brief * \brief
* *
*/ */
virtual jsize_t GetMinimumLayoutSize(Container *parent); virtual jsize_t GetMinimumLayoutSize(Container *parent);
/** /**
* \brief * \brief
* *
 End of changes. 11 change blocks. 
11 lines changed or deleted 11 lines changed or added


 jbutton.h   jbutton.h 
skipping to change at line 49 skipping to change at line 49
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Button : public Component{ class Button : public Component{
private: private:
std::vector<ButtonListener *> _button_listeners; std::vector<ButtonListener *> _button_listeners;
std::vector<std::string> _name_list; std::vector<std::string> _name_list;
int _index; int _index;
protected: protected:
jalign_t _align; jhorizontal_align_t _halign;
jvertical_align_t _valign;
bool _wrap;
public: public:
/** /**
* \brief * \brief
* *
*/ */
Button(std::string label, int x = 0, int y = 0, int width = 0, int height = 0); Button(std::string label, int x = 0, int y = 0, int width = DEFAULT_COMPONENT_WIDTH, int height = DEFAULT_COMPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~Button(); virtual ~Button();
/** /**
* \brief * \brief
* *
*/ */
void SetText(std::string text); virtual void SetText(std::string text);
/** /**
* \brief * \brief
* *
*/ */
void AddName(std::string); virtual void AddName(std::string);
/** /**
* \brief * \brief
* *
*/ */
void RemoveName(int index); virtual void RemoveName(int index);
/** /**
* \brief * \brief
* *
*/ */
void SetCurrentNameIndex(int index); virtual void SetCurrentNameIndex(int index);
/** /**
* \brief * \brief
* *
*/ */
void NextName(); virtual void NextName();
/** /**
* \brief * \brief
* *
*/ */
void PreviousName(); virtual void PreviousName();
/** /**
* \brief * \brief
* *
*/ */
void SetAlign(jalign_t align); virtual void SetHorizontalAlign(jhorizontal_align_t align);
/** /**
* \brief * \brief
* *
*/ */
jalign_t GetAlign(); virtual jhorizontal_align_t GetHorizontalAlign();
/** /**
* \brief * \brief
* *
*/ */
std::string GetName(); virtual void SetVerticalAlign(jvertical_align_t align);
/**
* \brief
*
*/
virtual jvertical_align_t GetVerticalAlign();
/**
* \brief
*
*/
virtual std::string GetText();
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
skipping to change at line 140 skipping to change at line 154
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(MouseEvent *event); virtual bool ProcessEvent(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void RegisterButtonListener(ButtonListener *listener); virtual void RegisterButtonListener(ButtonListener *listener );
/** /**
* \brief * \brief
* *
*/ */
void RemoveButtonListener(ButtonListener *listener); virtual void RemoveButtonListener(ButtonListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(ButtonEvent *event); virtual void DispatchButtonEvent(ButtonEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<ButtonListener *> & GetButtonListeners(); virtual std::vector<ButtonListener *> & GetButtonListeners() ;
}; };
} }
#endif #endif
 End of changes. 15 change blocks. 
15 lines changed or deleted 29 lines changed or added


 jbuttonevent.h   jbuttonevent.h 
skipping to change at line 66 skipping to change at line 66
/** /**
* \brief * \brief
* *
*/ */
virtual ~ButtonEvent(); virtual ~ButtonEvent();
/** /**
* \brief * \brief
* *
*/ */
std::string GetSymbol(); virtual std::string GetSymbol();
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jcalendarevent.h   jcalendarevent.h 
skipping to change at line 47 skipping to change at line 47
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class CalendarEvent : public jcommon::EventObject{ class CalendarEvent : public jcommon::EventObject{
private: private:
int _day, int _day,
_month, _month,
_year; _year;
public: public:
/** /**
* \brief * \brief
* *
*/ */
CalendarEvent(void *source, int day, int month, int year); CalendarEvent(void *source, int day, int month, int year);
/** /**
* \brief * \brief
* *
*/ */
virtual ~CalendarEvent(); virtual ~CalendarEvent();
/** /**
* \brief * \brief
* *
*/ */
int GetDay(); virtual int GetDay();
/** /**
* \brief * \brief
* *
*/ */
int GetMonth(); virtual int GetMonth();
/** /**
* \brief * \brief
* *
*/ */
int GetYear(); virtual int GetYear();
}; };
} }
#endif #endif
 End of changes. 4 change blocks. 
5 lines changed or deleted 5 lines changed or added


 jcardlayout.h   jcardlayout.h 
skipping to change at line 69 skipping to change at line 69
/** /**
* \brief * \brief
* *
*/ */
virtual ~CardLayout(); virtual ~CardLayout();
/** /**
* \brief * \brief
* *
*/ */
int GetHGap(); virtual int GetHGap();
/** /**
* \brief * \brief
* *
*/ */
int GetVGap(); virtual int GetVGap();
/** /**
* \brief * \brief
* *
*/ */
void SetHGap(int hgap); virtual void SetHGap(int hgap);
/** /**
* \brief * \brief
* *
*/ */
void SetVGap(int vgap); virtual void SetVGap(int vgap);
/** /**
* \brief * \brief
* *
*/ */
void AddLayoutComponent(std::string name, Component *comp); virtual void AddLayoutComponent(std::string name, Component *comp);
/** /**
* \brief * \brief
* *
*/ */
void RemoveLayoutComponent(Component *comp); virtual void RemoveLayoutComponent(Component *comp);
/** /**
* \brief * \brief
* *
*/ */
void CheckLayout(Container *parent); virtual void CheckLayout(Container *parent);
/** /**
* \brief * \brief
* *
*/ */
void First(Container *parent); virtual void First(Container *parent);
/** /**
* \brief * \brief
* *
*/ */
void Next(Container *parent); virtual void Next(Container *parent);
/** /**
* \brief * \brief
* *
*/ */
void Previous(Container *parent); virtual void Previous(Container *parent);
/** /**
* \brief * \brief
* *
*/ */
void Last(Container *parent); virtual void Last(Container *parent);
/** /**
* \brief * \brief
* *
*/ */
void ShowDefaultComponent(Container *parent); virtual void ShowDefaultComponent(Container *parent);
/** /**
* \brief * \brief
* *
*/ */
virtual jsize_t GetMinimumLayoutSize(Container *parent); virtual jsize_t GetMinimumLayoutSize(Container *parent);
/** /**
* \brief * \brief
* *
 End of changes. 12 change blocks. 
12 lines changed or deleted 12 lines changed or added


 jcheckbutton.h   jcheckbutton.h 
skipping to change at line 50 skipping to change at line 50
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class CheckButton : public Component{ class CheckButton : public Component{
private: private:
std::vector<CheckButtonListener *> _check_listeners; std::vector<CheckButtonListener *> _check_listeners;
std::string _label; std::string _text;
jcheckbox_type_t _type; jcheckbox_type_t _type;
jhorizontal_align_t _halign;
jvertical_align_t _valign;
bool _checked, bool _checked,
_just_check; _just_check,
_wrap;
public: public:
/** /**
* \brief * \brief
* *
*/ */
CheckButton(jcheckbox_type_t type, std::string label, int x = 0, int y = 0, int width = 0, int height = 0); CheckButton(jcheckbox_type_t type, std::string text, int x = 0, int y = 0, int width = DEFAULT_COMPONENT_WIDTH, int height = DEFAULT_CO MPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~CheckButton(); virtual ~CheckButton();
/** /**
* \brief * \brief
* *
*/ */
void SetType(jcheckbox_type_t type); virtual void SetText(std::string text);
/** /**
* \brief * \brief
* *
*/ */
jcheckbox_type_t GetType(); virtual std::string GetText();
/** /**
* \brief * \brief
* *
*/ */
bool IsSelected(); virtual void SetType(jcheckbox_type_t type);
/** /**
* \brief * \brief
* *
*/ */
void SetSelected(bool b); virtual jcheckbox_type_t GetType();
/**
* \brief
*
*/
virtual bool IsSelected();
/**
* \brief
*
*/
virtual void SetSelected(bool b);
/**
* \brief
*
*/
virtual void SetHorizontalAlign(jhorizontal_align_t align);
/**
* \brief
*
*/
virtual jhorizontal_align_t GetHorizontalAlign();
/**
* \brief
*
*/
virtual void SetVerticalAlign(jvertical_align_t align);
/**
* \brief
*
*/
virtual jvertical_align_t GetVerticalAlign();
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
skipping to change at line 114 skipping to change at line 153
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(MouseEvent *event); virtual bool ProcessEvent(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void RegisterCheckButtonListener(CheckButtonListener *listen er); virtual void RegisterCheckButtonListener(CheckButtonListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void RemoveCheckButtonListener(CheckButtonListener *listener ); virtual void RemoveCheckButtonListener(CheckButtonListener * listener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(CheckButtonEvent *event); virtual void DispatchCheckButtonEvent(CheckButtonEvent *even t);
/** /**
* \brief * \brief
* *
*/ */
std::vector<CheckButtonListener *> & GetCheckButtonListeners (); virtual std::vector<CheckButtonListener *> & GetCheckButtonL isteners();
}; };
} }
#endif #endif
 End of changes. 12 change blocks. 
11 lines changed or deleted 50 lines changed or added


 jcheckbuttonevent.h   jcheckbuttonevent.h 
skipping to change at line 64 skipping to change at line 64
/** /**
* \brief * \brief
* *
*/ */
virtual ~CheckButtonEvent(); virtual ~CheckButtonEvent();
/** /**
* \brief * \brief
* *
*/ */
bool IsSelected(); virtual bool IsSelected();
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jcheckbuttongroup.h   jcheckbuttongroup.h 
skipping to change at line 68 skipping to change at line 68
/** /**
* \brief * \brief
* *
*/ */
virtual ~CheckButtonGroup(); virtual ~CheckButtonGroup();
/** /**
* \brief * \brief
* *
*/ */
void Add(CheckButton *button); virtual void Add(CheckButton *button);
/** /**
* \brief * \brief
* *
*/ */
void Remove(CheckButton *button); virtual void Remove(CheckButton *button);
/** /**
* \brief * \brief
* *
*/ */
CheckButton * GetSelected(); virtual CheckButton * GetSelected();
}; };
} }
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 jcombobox.h   jcombobox.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_COMBOBOX_H #ifndef J_COMBOBOX_H
#define J_COMBOBOX_H #define J_COMBOBOX_H
#include "jselectlistener.h" #include "jselectlistener.h"
#include "jcomponent.h" #include "jitemcomponent.h"
#include "jmenu.h" #include "jmenu.h"
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>
#include <map> #include <map>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
#include <time.h> #include <time.h>
namespace jgui { namespace jgui {
class MenuItem; class ComboBox : public jgui::ItemComponent, public jgui::SelectListener{
class ComboMenuComponent;
/**
* \brief
*
* \author Jeff Ferr
*/
class ComboMenu : public jgui::Frame, public jgui::FrameInputListener{
friend class ComboMenuComponent;
private:
jthread::Mutex _menu_mutex;
std::vector<ComboMenu *> _menus;
std::vector<MenuListener *> _menu_listeners;
MenuItem *_current_item;
ComboMenuComponent *_list;
int _visible_items;
jmenu_align_t _menu_align;
private: private:
/** Menu *_menu;
* \brief jhorizontal_align_t _halign;
* jvertical_align_t _valign;
*/ int _old_index;
virtual void MousePressed(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseReleased(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseClicked(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseMoved(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseWheel(MouseEvent *event);
public: public:
/** /**
* \brief * \brief
* *
*/ */
ComboMenu(int x, int y, int width, int visible_items); ComboBox(int x = 0, int y = 0, int width = DEFAULT_COMPONENT
_WIDTH, int height = DEFAULT_COMPONENT_HEIGHT, int visible_items = 5);
/**
* \brief
*
*/
virtual ~ComboMenu();
/**
* \brief
*
*/
virtual bool Show(bool modal = true);
/**
* \brief
*
*/
virtual void SetTitle(std::string title);
/**
* \brief
*
*/
void SetComboMenuAlign(jmenu_align_t align);
/**
* \brief
*
*/
int GetItemsSize();
/**
* \brief
*
*/
int GetVisibleItems();
/**
* \brief
*
*/
void SetLoop(bool loop);
/**
* \brief
*
*/
void SetCurrentIndex(int i);
/**
* \brief
*
*/
void AddMenuItem(MenuItem *item);
/**
* \brief
*
*/
MenuItem * GetCurrentItem();
/**
* \brief
*
*/
int GetCurrentIndex();
/**
* \brief
*
*/
void RemoveItem(int index);
/**
* \brief
*
*/
void RemoveAll();
/**
* \brief
*
*/
jcolor_t GetItemColor();
/**
* \brief
*
*/
void SetItemColor(jcolor_t color);
/**
* \brief
*
*/
void SetForegroundColor(jcolor_t color);
/**
* \brief
*
*/
void SetBackgroundColor(jcolor_t color);
/**
* \brief
*
*/
void SetItemColor(int red, int green, int blue, int alpha);
/**
* \brief
*
*/
void SetForegroundColor(int red, int green, int blue, int al
pha);
/**
* \brief
*
*/
void SetBackgroundColor(int red, int green, int blue, int al
pha);
/**
* \brief
*
*/
void RegisterMenuListener(MenuListener *listener);
/**
* \brief
*
*/
void RemoveMenuListener(MenuListener *listener);
/**
* \brief
*
*/
void DispatchEvent(MenuEvent *event);
/**
* \brief
*
*/
std::vector<MenuListener *> & GetMenuListeners();
/**
* \brief
*
*/
virtual void InputChanged(KeyEvent *event);
};
class ComboMenuComponent : public Component{
friend class ComboMenu;
private:
std::vector<MenuItem *>_items;
OffScreenImage *prefetch;
ComboMenu *_menu;
int bx,
by,
bwidth,
bheight,
_item_size,
_index,
_visible_items,
_paint_count,
_vertical_gap,
_horizontal_gap;
jcolor_t _item_color;
float delta;
bool _input_locked,
_arrows_visible,
_loop;
/**
* \brief
*
*/
void SetComboMenu(ComboMenu *menu);
public:
/** /**
* \brief * \brief
* *
*/ */
ComboMenuComponent(int x, int y, int width, int visible_item s); virtual ~ComboBox();
/** /**
* \brief * \brief
* *
*/ */
virtual ~ComboMenuComponent(); virtual void SetVisibleItems(int max_items);
/** /**
* \brief * \brief
* *
*/ */
void SetGap(int hgap, int vgap); virtual void SetHorizontalAlign(jhorizontal_align_t align);
/** /**
* \brief * \brief
* *
*/ */
void SetLoop(bool loop); virtual jhorizontal_align_t GetHorizontalAlign();
/** /**
* \brief * \brief
* *
*/ */
void SetCurrentIndex(int i); virtual void SetVerticalAlign(jvertical_align_t align);
/** /**
* \brief * \brief
* *
*/ */
void AddEmptyItem(); virtual jvertical_align_t GetVerticalAlign();
/** /**
* \brief * \brief
* *
*/ */
void AddItem(std::string text); virtual void ItemSelected(SelectEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void AddItem(std::string text, std::string image); virtual void ItemChanged(SelectEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void AddItem(std::string text, bool checked); virtual bool ProcessEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void AddMenuItem(MenuItem *item); virtual bool ProcessEvent(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
MenuItem * GetMenuItem(int index); virtual jcolor_t GetItemColor();
/** /**
* \brief * \brief
* *
*/ */
MenuItem * GetCurrentMenuItem(); virtual void SetItemColor(jcolor_t color);
/** /**
* \brief * \brief
* *
*/ */
int GetCurrentIndex(); virtual void SetItemColor(int red, int green, int blue, int alpha);
/** /**
* \brief * \brief
* *
*/ */
int GetItemsSize(); virtual jcolor_t GetItemFocusColor();
/** /**
* \brief * \brief
* *
*/ */
void RemoveItem(int index); virtual void SetItemFocusColor(jcolor_t color);
/** /**
* \brief * \brief
* *
*/ */
void RemoveAll(); virtual void SetItemFocusColor(int red, int green, int blue, int alpha);
/** /**
* \brief * \brief
* *
*/ */
jcolor_t GetItemColor(); virtual int GetItemsSize();
/** /**
* \brief * \brief
* *
*/ */
void SetItemColor(jcolor_t color); virtual void SetLoop(bool loop);
/** /**
* \brief * \brief
* *
*/ */
void SetItemColor(int red, int green, int blue, int alpha); virtual void SetCurrentIndex(int i);
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void AddEmptyItem();
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual void AddTextItem(std::string text);
};
class ComboBox : public Component, public MenuListener{//, public jthread::
Thread{
private:
std::vector<SelectListener *> _select_listeners;
ComboMenu *_menu;
int _arrow_size,
_old_index;
public:
/** /**
* \brief * \brief
* *
*/ */
ComboBox(int x = 0, int y = 0, int width = 0, int height = 0 , int visible_items = 3); virtual void AddImageItem(std::string text, std::string imag e);
/** /**
* \brief * \brief
* *
*/ */
virtual ~ComboBox(); virtual void AddCheckedItem(std::string text, bool checked);
/** /**
* \brief * \brief
* *
*/ */
void SetArrowSize(int size); virtual void AddItem(Item *item);
/** /**
* \brief * \brief
* *
*/ */
int GetArrowSize(); virtual void AddItem(Item *item, int index);
/** /**
* \brief * \brief
* *
*/ */
void SetVisibleItems(int max_items); virtual void AddItems(std::vector<Item *> &items);
/** /**
* \brief * \brief
* *
*/ */
void SetLoop(bool b); virtual void RemoveItem(Item *item);
/** /**
* \brief * \brief
* *
*/ */
void SetIndex(int i); virtual void RemoveItem(int index);
/** /**
* \brief * \brief
* *
*/ */
std::string GetValue(); virtual void RemoveItems();
/** /**
* \brief * \brief
* *
*/ */
int GetIndex(); virtual Item * GetItem(int index);
/** /**
* \brief * \brief
* *
*/ */
void Add(std::string text); virtual std::vector<Item *> & GetItems();
/** /**
* \brief * \brief
* *
*/ */
void Remove(int index); virtual Item * GetCurrentItem();
/** /**
* \brief * \brief
* *
*/ */
void RemoveAll(); virtual int GetCurrentIndex();
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/**
* \brief
*
*/
virtual void ItemSelected(MenuEvent *event);
/**
* \brief
*
*/
virtual void ItemChanged(MenuEvent *event);
/**
* \brief
*
*/
void RegisterSelectListener(SelectListener *listener);
/**
* \brief
*
*/
void RemoveSelectListener(SelectListener *listener);
/**
* \brief
*
*/
void DispatchEvent(SelectEvent *event);
/**
* \brief
*
*/
std::vector<SelectListener *> & GetSelectListeners();
/**
* \brief
*
*/
virtual void Run();
/**
* \brief
*
*/
virtual bool ProcessEvent(KeyEvent *event);
/**
* \brief
*
*/
virtual bool ProcessEvent(MouseEvent *event);
}; };
} }
#endif #endif
 End of changes. 40 change blocks. 
334 lines changed or deleted 41 lines changed or added


 jcomponent.h   jcomponent.h 
skipping to change at line 42 skipping to change at line 42
#include "jkeyevent.h" #include "jkeyevent.h"
#include "jmouseevent.h" #include "jmouseevent.h"
#include <string> #include <string>
#include <vector> #include <vector>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
#define DEFAULT_COMPONENT_WIDTH 100 #define DEFAULT_COMPONENT_WIDTH 192
#define DEFAULT_COMPONENT_HEIGHT 40 #define DEFAULT_COMPONENT_HEIGHT 54
#define CENTER_VERTICAL_TEXT \
(_font==NULL)?0:(_font->GetHeight()>_size.height)?0:((_size.height-_
font->GetHeight())/2)
/*
#define CENTER_VERTICAL_ERROR \
(int)(_font->GetHeight()/(2.25*(double)GFXHandler::GetInstance()->Ge
tScreenHeight()/(double)DEFAULT_SCALE_HEIGHT))
#define CENTER_VERTICAL_TEXT \
(_font==NULL)?0:(_font->GetHeight()>_height)?0:((_height-_font->GetH
eight())/2-CENTER_VERTICAL_ERROR)<0?0:((_height-_font->GetHeight())/2-CENTE
R_VERTICAL_ERROR)
*/
namespace jgui { namespace jgui {
enum jcomponent_alignment_t { enum jcomponent_alignment_t {
TOP_ALIGNMENT = 0, TOP_ALIGNMENT = 0,
CENTER_ALIGNMENT = 1, CENTER_ALIGNMENT = 1,
BOTTOM_ALIGNMENT = 2, BOTTOM_ALIGNMENT = 2,
LEFT_ALIGNMENT = 0, LEFT_ALIGNMENT = 0,
RIGHT_ALIGNMENT = 2 RIGHT_ALIGNMENT = 2
}; };
skipping to change at line 101 skipping to change at line 90
// for any height H the difference between H and <code>getBaseline(w , H)</code> is the same. For example, a <code> // for any height H the difference between H and <code>getBaseline(w , H)</code> is the same. For example, a <code>
// JLabel</code> containing non-empty text with a vertical alignment of <code>BOTTOM</code> should have a baseline // JLabel</code> containing non-empty text with a vertical alignment of <code>BOTTOM</code> should have a baseline
// type of <code>CONSTANT_DESCENT</code>. // type of <code>CONSTANT_DESCENT</code>.
CB_CONSTANT_DESCENT, CB_CONSTANT_DESCENT,
// Indicates the baseline remains a fixed distance from the center o f the component. That is, for any height H the // Indicates the baseline remains a fixed distance from the center o f the component. That is, for any height H the
// difference between <code>getBaseline(w, H)</code> and <code>H / 2 </code> is the same (plus or minus one depending // difference between <code>getBaseline(w, H)</code> and <code>H / 2 </code> is the same (plus or minus one depending
// upon rounding error). <p> Because of possible rounding errors it is recommended you ask for the baseline with two // upon rounding error). <p> Because of possible rounding errors it is recommended you ask for the baseline with two
// consecutive heights and use the return value to determine if you need to pad calculations by 1. The following shows // consecutive heights and use the return value to determine if you need to pad calculations by 1. The following shows
// how to calculate the baseline for any height: // how to calculate the baseline for any height:
// <pre> // <pre>
// Dimension preferredSize = component.getPreferredSize(); // jregion_t preferredSize = component->GetPreferredSize();
// int baseline = getBaseline(preferredSize.width, preferredSi // int baseline = GetBaseline(preferredSize.width, preferredSize.
ze.height); height);
// int nextBaseline = getBaseline(preferredSize.width, preferr // int nextBaseline = GetBaseline(preferredSize.width, preferredS
edSize.height + 1); ize.height + 1);
// // Amount to add to height when calculating // // Amount to add to height when calculating where ba
where baseline lands for a particular height: seline lands for a particular height:
// int padding = 0; // int padding = 0;
// // Where the baseline is relative to the mi // // Where the baseline is relative to the mid point
d point // int baselineOffset = baseline - height / 2;
// int baselineOffset = baseline - height / 2; // if (preferredSize.height % 2 == 0 && baseline != nex
// if (preferredSize.height % 2 == 0 &amp;&amp tBaseline) {
; // padding = 1;
// baseline != nextBaseline) { // } else if (preferredSize.height % 2 == 1 && baseline
// padding = 1; == nextBaseline) {
// } else if (preferredSize.height % 2 == 1 &a // baselineOffset--;
mp;&amp; // padding = 1;
// baseline == nextBaseline) { // }
// baselineOffset--; // // The following calculates where the baseline lands
// padding = 1; for the height z:
// } // int calculatedBaseline = (z + padding) / 2 + baselin
// // The following calculates where the basel eOffset;
ine lands for the height z:
// int calculatedBaseline = (z + padding) / 2
+ baselineOffset;
// </pre> // </pre>
CB_CENTER_OFFSET, CB_CENTER_OFFSET,
// Indicates the baseline resize behavior can not be expressed using any of the other constants. // Indicates the baseline resize behavior can not be expressed using any of the other constants.
// This may also indicate the baseline varies with the width of the component. This is also returned // This may also indicate the baseline varies with the width of the component. This is also returned
// by components that do not have a baseline. // by components that do not have a baseline.
CB_OTHER CB_OTHER
}; };
class FocusListener; class FocusListener;
class FocusEvent; class FocusEvent;
skipping to change at line 156 skipping to change at line 143
std::vector<ComponentListener *> _component_listeners; std::vector<ComponentListener *> _component_listeners;
Component *_left, Component *_left,
*_right, *_right,
*_up, *_up,
*_down; *_down;
jgui::Container *_parent; jgui::Container *_parent;
jgui::Font *_font; jgui::Font *_font;
jpoint_t _location; jpoint_t _location;
jsize_t _size, jsize_t _size,
_minimum_size, _minimum_size,
_maximum_size, _maximum_size;
_preferred_size; jcolor_t _bgcolor,
jcolor_t _bg_color, _fgcolor,
_fg_color, _focus_bgcolor,
_bgfocus_color, _focus_fgcolor,
_fgfocus_color,
_border_color, _border_color,
_borderfocus_color; _focus_border_color;
jcomponent_alignment_t _alignment_x, jcomponent_alignment_t _alignment_x,
_alignment_y; _alignment_y;
jcomponent_orientation_t _orientation; jcomponent_orientation_t _orientation;
jcomponent_border_t _border; jcomponent_border_t _border;
int _gradient_level, int _gradient_level,
_vertical_gap, _vertical_gap,
_horizontal_gap, _horizontal_gap,
_border_size; _border_size;
bool _has_focus, bool _has_focus,
_is_visible, _is_visible,
_ignore_repaint, _ignore_repaint,
_truncate_string, _background_visible,
_background_visible, _is_focusable,
_is_focusable, _enabled,
_enabled, _theme_enabled,
_theme_enabled, _is_opaque,
_is_opaque, _is_valid;
_is_valid;
/**
* \brief
*
*/
std::string TruncateString(std::string text, int width);
protected: protected:
/** /**
* \brief render surface using component_border_t parameter * \brief render surface using component_border_t parameter
* *
*/ */
void FillRectangle(Graphics *g, int x, int y, int width, int height); void FillRectangle(Graphics *g, int x, int y, int width, int height);
public: public:
/** /**
skipping to change at line 213 skipping to change at line 192
/** /**
* \brief * \brief
* *
*/ */
virtual ~Component(); virtual ~Component();
/** /**
* \brief * \brief
* *
*/ */
static int CountLines(std::string text, int width, Font *fon
t);
/**
* \brief
*
*/
virtual Container * GetParent(); virtual Container * GetParent();
/** /**
* \brief * \brief
* *
*/ */
virtual int GetBaseline(int width, int height); virtual int GetBaseline(int width, int height);
/** /**
* \brief * \brief
skipping to change at line 327 skipping to change at line 300
/** /**
* \brief * \brief
* *
*/ */
virtual void SetGap(int hgap, int vgap); virtual void SetGap(int hgap, int vgap);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetParent(Container *parent); virtual void SetHorizontalGap(int hgap);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetBackgroundVisible(bool b); virtual void SetVerticalGap(int vgap);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetTruncated(bool b); virtual int GetHorizontalGap();
/**
* \brief
*
*/
virtual int GetVerticalGap();
/**
* \brief
*
*/
virtual void SetParent(Container *parent);
/**
* \brief
*
*/
virtual void SetBackgroundVisible(bool b);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetEnabled(bool b); virtual void SetEnabled(bool b);
/** /**
* \brief * \brief
* *
skipping to change at line 435 skipping to change at line 426
/** /**
* \brief * \brief
* *
*/ */
virtual void SetBorderSize(int size); virtual void SetBorderSize(int size);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetMinimumSize(jsize_t size); virtual int GetBorderSize();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetMaximumSize(jsize_t size); virtual void SetMinimumSize(jsize_t size);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetPreferredSize(jsize_t size); virtual void SetMaximumSize(jsize_t size);
/** /**
* \brief * \brief
* *
*/ */
virtual jsize_t GetMinimumSize(); virtual jsize_t GetMinimumSize();
/** /**
* \brief * \brief
* *
skipping to change at line 717 skipping to change at line 708
/** /**
* \brief * \brief
* *
*/ */
virtual jcolor_t GetBorderColor(); virtual jcolor_t GetBorderColor();
/** /**
* \brief * \brief
* *
*/ */
virtual jcolor_t GetBorderFocusColor();
/**
* \brief
*
*/
virtual void SetFocusable(bool b); virtual void SetFocusable(bool b);
/** /**
* \brief * \brief
* *
*/ */
virtual bool IsFocusable(); virtual bool IsFocusable();
/** /**
* \brief * \brief
skipping to change at line 741 skipping to change at line 738
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual void PaintBorder(Graphics *g); virtual void PaintEdges(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual void Repaint(bool all = false); virtual void Repaint(bool all = false);
/** /**
* \brief * \brief
* *
*/ */
void RegisterFocusListener(FocusListener *listener); virtual void RegisterFocusListener(FocusListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void RemoveFocusListener(FocusListener *listener); virtual void RemoveFocusListener(FocusListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(FocusEvent *event); virtual void DispatchFocusEvent(FocusEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<FocusListener *> & GetFocusListeners(); virtual std::vector<FocusListener *> & GetFocusListeners();
/** /**
* \brief * \brief
* *
*/ */
void RegisterComponentListener(ComponentListener *listener); virtual void RegisterComponentListener(ComponentListener *li stener);
/** /**
* \brief * \brief
* *
*/ */
void RemoveComponentListener(ComponentListener *listener); virtual void RemoveComponentListener(ComponentListener *list ener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(ComponentEvent *event); virtual void DispatchComponentEvent(ComponentEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<ComponentListener *> & GetComponentListeners(); virtual std::vector<ComponentListener *> & GetComponentListe ners();
}; };
} }
#endif #endif
 End of changes. 22 change blocks. 
86 lines changed or deleted 77 lines changed or added


 jcomponentevent.h   jcomponentevent.h 
skipping to change at line 46 skipping to change at line 46
namespace jgui { namespace jgui {
/** /**
* \brief * \brief
* *
*/ */
enum jcomponent_event_t { enum jcomponent_event_t {
COMPONENT_HIDDEN_EVENT, COMPONENT_HIDDEN_EVENT,
COMPONENT_SHOWN_EVENT, COMPONENT_SHOWN_EVENT,
COMPONENT_MOVED_EVENT, COMPONENT_MOVED_EVENT,
COMPONENT_PAINT_EVENT COMPONENT_PAINTED_EVENT
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class ComponentEvent : public jcommon::EventObject{ class ComponentEvent : public jcommon::EventObject{
private: private:
skipping to change at line 76 skipping to change at line 76
/** /**
* \brief * \brief
* *
*/ */
virtual ~ComponentEvent(); virtual ~ComponentEvent();
/** /**
* \brief * \brief
* *
*/ */
jcomponent_event_t GetType(); virtual jcomponent_event_t GetType();
}; };
} }
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jcomponentlistener.h   jcomponentlistener.h 
skipping to change at line 82 skipping to change at line 82
/** /**
* \brief * \brief
* *
*/ */
virtual void ComponentMoved(ComponentEvent *event); virtual void ComponentMoved(ComponentEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void ComponentRepainted(ComponentEvent *event); virtual void ComponentPainted(ComponentEvent *event);
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jcondition.h   jcondition.h 
skipping to change at line 45 skipping to change at line 45
/** /**
* \brief Condition. * \brief Condition.
* *
* @author Jeff Ferr * @author Jeff Ferr
*/ */
class Condition : public virtual jcommon::Object{ class Condition : public virtual jcommon::Object{
private: private:
#ifdef _WIN32 #ifdef _WIN32
#else #else
/** \brief Descritor */ /** \brief Descritor */
pthread_cond_t _condition; pthread_cond_t _condition;
#endif #endif
/** \brief Mutex */ /** \brief Mutex */
Mutex _monitor; Mutex _monitor;
/** \brief Mutex */ /** \brief Mutex */
int _count; int _count;
/** \brief Mutex */ /** \brief Mutex */
int _nblock; int _nblock;
/** \brief */ /** \brief */
bool _is_open; bool _is_open;
public: public:
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
Condition(int nblock = 1); Condition(int nblock = 1);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~Condition(); virtual ~Condition();
/** /**
* \brief Lock semaphore. * \brief Lock semaphore.
* *
*/ */
void Wait(Mutex *mutex = NULL); void Wait(Mutex *mutex = NULL);
/** /**
* \brief Lock semaphore. * \brief Lock semaphore.
* *
* \param time_ is an absolute time specification, zero is t * \param time_ is an absolute time specification, z
he beginning of ero is the beginning of
* the epoch (00:00:00 GMT, January 1, 1970). * the epoch (00:00:00 GMT, January 1, 1970).
* *
*/ */
void Wait(long long time_, Mutex *mutex = NULL); void Wait(long long time_, Mutex *mutex = NULL);
/** /**
* \brief Notify the locked semaphore. * \brief Notify the locked semaphore.
* *
*/ */
void Notify(); void Notify();
/** /**
* \brief Notify all the locked semaphores. * \brief Notify all the locked semaphores.
* *
*/ */
void NotifyAll(); void NotifyAll();
/** /**
* \brief * \brief
* *
*/ */
void Release(); void Release();
}; };
} }
#endif #endif
 End of changes. 9 change blocks. 
49 lines changed or deleted 49 lines changed or added


 jconnection.h   jconnection.h 
skipping to change at line 153 skipping to change at line 153
/** /**
* \brief * \brief
* *
*/ */
virtual jio::OutputStream * GetOutputStream() = 0; virtual jio::OutputStream * GetOutputStream() = 0;
/** /**
* \brief Get the bytes sent to a destination. * \brief Get the bytes sent to a destination.
* *
*/ */
virtual long long GetSentBytes() = 0; virtual int64_t GetSentBytes() = 0;
/** /**
* \brief Get de bytes received from a source. * \brief Get de bytes received from a source.
* *
*/ */
virtual long long GetReceiveBytes() = 0; virtual int64_t GetReceiveBytes() = 0;
}; };
} }
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jconnectionpipe.h   jconnectionpipe.h 
skipping to change at line 203 skipping to change at line 203
/** /**
* \brief * \brief
* *
*/ */
virtual jio::OutputStream * GetOutputStream(); virtual jio::OutputStream * GetOutputStream();
/** /**
* \brief Get sent bytes to destination. * \brief Get sent bytes to destination.
* *
*/ */
long long GetSentBytes(); int64_t GetSentBytes();
/** /**
* \brief Get received bytes from a source. * \brief Get received bytes from a source.
* *
*/ */
long long GetReceiveBytes(); int64_t GetReceiveBytes();
/** /**
* \brief * \brief
* *
*/ */
virtual void Run(); virtual void Run();
}; };
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jcontainer.h   jcontainer.h 
skipping to change at line 206 skipping to change at line 206
/** /**
* \brief * \brief
* *
*/ */
virtual int GetComponentCount(); virtual int GetComponentCount();
/** /**
* \brief * \brief
* *
*/ */
std::vector<Component *> & GetComponents(); virtual std::vector<Component *> & GetComponents();
/** /**
* \brief * \brief
* *
*/ */
virtual bool Intersect(Component *c1, Component *c2); virtual bool Intersect(Component *c1, Component *c2);
/** /**
* \brief * \brief
* *
skipping to change at line 296 skipping to change at line 296
/** /**
* \brief * \brief
* *
*/ */
virtual void PutComponentBelow(Component *c, Component *c1); virtual void PutComponentBelow(Component *c, Component *c1);
/** /**
* \brief * \brief
* *
*/ */
void RegisterContainerListener(ContainerListener *listener); virtual void RegisterContainerListener(ContainerListener *li stener);
/** /**
* \brief * \brief
* *
*/ */
void RemoveContainerListener(ContainerListener *listener); virtual void RemoveContainerListener(ContainerListener *list ener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(ContainerEvent *event); virtual void DispatchContainerEvent(ContainerEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<ContainerListener *> & GetFrameListeners(); virtual std::vector<ContainerListener *> & GetFrameListeners ();
}; };
} }
#endif #endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 jcontainerevent.h   jcontainerevent.h 
skipping to change at line 43 skipping to change at line 43
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
#include <time.h> #include <time.h>
namespace jgui { namespace jgui {
/** /**
* \brief * \brief
* *
*/ */
enum frame_event_t { enum jframe_event_t {
COMPONENT_ADDED_EVENT, COMPONENT_ADDED_EVENT,
COMPONENT_REMOVED_EVENT COMPONENT_REMOVED_EVENT
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class ContainerEvent : public jcommon::EventObject{ class ContainerEvent : public jcommon::EventObject{
private: private:
Component *_component; Component *_component;
frame_event_t _type; jframe_event_t _type;
public: public:
/** /**
* \brief * \brief
* *
*/ */
ContainerEvent(void *source, Component *component, frame_eve nt_t type); ContainerEvent(void *source, Component *component, jframe_ev ent_t type);
/** /**
* \brief * \brief
* *
*/ */
virtual ~ContainerEvent(); virtual ~ContainerEvent();
/** /**
* \brief * \brief
* *
*/ */
Component * GetComponent(); virtual Component * GetComponent();
/** /**
* \brief * \brief
* *
*/ */
frame_event_t GetType(); virtual jframe_event_t GetType();
}; };
} }
#endif #endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 jcoordinatelayout.h   jcoordinatelayout.h 
skipping to change at line 70 skipping to change at line 70
/** /**
* \brief * \brief
* *
*/ */
virtual ~CoordinateLayout(); virtual ~CoordinateLayout();
/** /**
* \brief * \brief
* *
*/ */
void SetWidth(int width); virtual void SetWidth(int width);
/** /**
* \brief * \brief
* *
*/ */
void SetHeight(int height); virtual void SetHeight(int height);
/** /**
* \brief * \brief
* *
*/ */
void SetType(jcoordinate_layout_t type); virtual void SetType(jcoordinate_layout_t type);
/** /**
* \brief * \brief
* *
*/ */
int GetWidth(); virtual int GetWidth();
/** /**
* \brief * \brief
* *
*/ */
int GetHeight(); virtual int GetHeight();
/** /**
* \brief * \brief
* *
*/ */
jcoordinate_layout_t GetType(); virtual jcoordinate_layout_t GetType();
/** /**
* \brief * \brief
* *
*/ */
jsize_t GetPreferredSize(Container *target); virtual jsize_t GetPreferredSize(Container *target);
/** /**
* \brief * \brief
* *
*/ */
virtual void DoLayout(Container *parent); virtual void DoLayout(Container *parent);
}; };
} }
 End of changes. 7 change blocks. 
7 lines changed or deleted 7 lines changed or added


 jdatagramsocket.h   jdatagramsocket.h 
skipping to change at line 77 skipping to change at line 77
sockaddr_in _server_sock; sockaddr_in _server_sock;
/** \brief Local inetaddress. */ /** \brief Local inetaddress. */
InetAddress *_local; InetAddress *_local;
/** \brief Remote inetaddress. */ /** \brief Remote inetaddress. */
InetAddress *_address; InetAddress *_address;
/** \brief Input stream. */ /** \brief Input stream. */
SocketInputStream *_is; SocketInputStream *_is;
/** \brief Output stream. */ /** \brief Output stream. */
SocketOutputStream *_os; SocketOutputStream *_os;
/** \brief Bytes sent. */ /** \brief Bytes sent. */
long long _sent_bytes; int64_t _sent_bytes;
/** \brief Bytes received. */ /** \brief Bytes received. */
long long _receive_bytes; int64_t _receive_bytes;
/** \brief Connect or not ? */ /** \brief Connect or not ? */
bool _stream; bool _stream;
/** \brief */ /** \brief */
int _timeout; int _timeout;
/** /**
* \brief Create a new socket. * \brief Create a new socket.
* *
*/ */
void CreateSocket(); void CreateSocket();
skipping to change at line 210 skipping to change at line 210
/** /**
* \brief Get port. * \brief Get port.
* *
*/ */
int GetPort(); int GetPort();
/** /**
* \brief Get sent bytes to destination. * \brief Get sent bytes to destination.
* *
*/ */
virtual long long GetSentBytes(); virtual int64_t GetSentBytes();
/** /**
* \brief Get received bytes from a source. * \brief Get received bytes from a source.
* *
*/ */
virtual long long GetReceiveBytes(); virtual int64_t GetReceiveBytes();
/** /**
* \brief Get a object SocketOption. * \brief Get a object SocketOption.
* *
*/ */
SocketOption * GetSocketOption(); SocketOption * GetSocketOption();
/** /**
* \brief * \brief
* *
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 jfile.h   jfile.h 
skipping to change at line 39 skipping to change at line 39
#else #else
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdint.h> #include <stdint.h>
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#endif #endif
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
namespace jio { namespace jio {
/** /**
* \brief Tipo de arquivo. * \brief Tipo de arquivo.
* *
*/ */
enum file_type_t { enum file_type_t {
F_REGULAR, F_REGULAR,
F_DIRECTORY, F_DIRECTORY,
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 jflowlayout.h   jflowlayout.h 
skipping to change at line 75 skipping to change at line 75
/** /**
* \brief * \brief
* *
*/ */
virtual ~FlowLayout(); virtual ~FlowLayout();
/** /**
* \brief * \brief
* *
*/ */
jflowlayout_align_t GetAlign(); virtual jflowlayout_align_t GetAlign();
/** /**
* \brief * \brief
* *
*/ */
int GetHGap(); virtual int GetHGap();
/** /**
* \brief * \brief
* *
*/ */
int GetVGap(); virtual int GetVGap();
/** /**
* \brief * \brief
* *
*/ */
bool GetAlignOnBaseline(); virtual bool GetAlignOnBaseline();
/** /**
* \brief * \brief
* *
*/ */
void SetAlign(jflowlayout_align_t align); virtual void SetAlign(jflowlayout_align_t align);
/** /**
* \brief * \brief
* *
*/ */
void SetHGap(int hgap); virtual void SetHGap(int hgap);
/** /**
* \brief * \brief
* *
*/ */
void SetVGap(int vgap); virtual void SetVGap(int vgap);
/** /**
* \brief * \brief
* *
*/ */
void SetAlignOnBaseline(bool align_on_baseline); virtual void SetAlignOnBaseline(bool align_on_baseline);
/** /**
* \brief * \brief
* *
*/ */
int MoveComponents(Container *target, int x, int y, int widt h, int height, int rowStart, int rowEnd, bool ltr, bool useBaseline, int *a scent, int *descent); virtual int MoveComponents(Container *target, int x, int y, int width, int height, int rowStart, int rowEnd, bool ltr, bool useBaseline , int *ascent, int *descent);
/** /**
* \brief * \brief
* *
*/ */
virtual jsize_t GetMinimumLayoutSize(Container *parent); virtual jsize_t GetMinimumLayoutSize(Container *parent);
/** /**
* \brief * \brief
* *
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added


 jfocusevent.h   jfocusevent.h 
skipping to change at line 74 skipping to change at line 74
/** /**
* \brief * \brief
* *
*/ */
virtual ~FocusEvent(); virtual ~FocusEvent();
/** /**
* \brief * \brief
* *
*/ */
jfocus_event_t GetType(); virtual jfocus_event_t GetType();
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jfont.h   jfont.h 
skipping to change at line 77 skipping to change at line 77
/** /**
* \brief * \brief
* *
*/ */
virtual ~Font(); virtual ~Font();
/** /**
* \brief * \brief
* *
*/ */
void * GetFont(); virtual void * GetFont();
/** /**
* \brief * \brief
* *
*/ */
void SetWorkingScreenSize(int width, int height); virtual void SetWorkingScreenSize(int width, int height);
/** /**
* \brief * \brief
* *
*/ */
bool SetEncoding(std::string code); virtual bool SetEncoding(std::string code);
/** /**
* \brief * \brief
* *
*/ */
std::string GetName(); virtual std::string GetName();
/** /**
* \brief * \brief
* *
*/ */
int GetVirtualHeight(); virtual int GetVirtualHeight();
/** /**
* \brief * \brief
* *
*/ */
int GetHeight(); virtual int GetHeight();
/** /**
* \brief * \brief
* *
*/ */
int GetAscender(); virtual int GetAscender();
/** /**
* \brief * \brief
* *
*/ */
int GetDescender(); virtual int GetDescender();
/** /**
* \brief * \brief
* *
*/ */
int GetMaxAdvanced(); virtual int GetMaxAdvanced();
/** /**
* \brief * \brief
* *
*/ */
int GetLeading(); virtual int GetLeading();
/** /**
* \brief * \brief
* *
*/ */
int GetStringWidth(std::string text); virtual int GetStringWidth(std::string text);
/** /**
* \brief * \brief
* *
*/ */
std::string TruncateString(std::string text, std::string ext ension, int width); virtual void Release();
/** /**
* \brief * \brief
* *
*/ */
void Release(); virtual void Restore();
/** /**
* \brief * \brief
* *
*/ */
void Restore(); virtual std::string TruncateString(std::string text, std::st ring extension, int width);
}; };
} }
#endif /*DFBHANDLER_H_*/ #endif /*DFBHANDLER_H_*/
 End of changes. 14 change blocks. 
14 lines changed or deleted 14 lines changed or added


 jframe.h   jframe.h 
skipping to change at line 304 skipping to change at line 304
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
void RegisterInputListener(FrameInputListener *listener); virtual void RegisterInputListener(FrameInputListener *liste ner);
/** /**
* \brief * \brief
* *
*/ */
void RemoveInputListener(FrameInputListener *listener); virtual void RemoveInputListener(FrameInputListener *listene r);
/** /**
* \brief * \brief
* *
*/ */
std::vector<FrameInputListener *> & GetFrameInputListeners() ; virtual std::vector<FrameInputListener *> & GetFrameInputLis teners();
}; };
} }
#endif #endif
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 jgfxhandler.h   jgfxhandler.h 
skipping to change at line 53 skipping to change at line 53
ARROW_CURSOR, ARROW_CURSOR,
SIZECORNER_CURSOR, SIZECORNER_CURSOR,
SIZEALL_CURSOR, SIZEALL_CURSOR,
SIZENS_CURSOR, SIZENS_CURSOR,
SIZEWE_CURSOR, SIZEWE_CURSOR,
SIZENWSE_CURSOR, SIZENWSE_CURSOR,
SIZENESW_CURSOR, SIZENESW_CURSOR,
WAIT_CURSOR WAIT_CURSOR
}; };
class OffScreenImage;
class Window; class Window;
class WindowManager; class WindowManager;
class Font;
class OffScreenImage;
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class GFXHandler : public virtual jcommon::Object{ class GFXHandler : public virtual jcommon::Object{
friend class Window; friend class Window;
friend class WindowManager; friend class WindowManager;
friend class Font;
protected: friend class OffScreenImage;
GFXHandler();
/**
* \brief
*
*/
int InitEngine();
private: private:
static GFXHandler * instance; static GFXHandler * _instance;
jthread::Mutex _mutex;
jcursor_style_t _cursor;
#ifdef DIRECTFB_UI #ifdef DIRECTFB_UI
IDirectFB *_dfb; IDirectFB *_dfb;
IDirectFBDisplayLayer *_layer; IDirectFBDisplayLayer *_layer;
struct cursor_params_t { struct cursor_params_t {
OffScreenImage *cursor; OffScreenImage *cursor;
int hot_x; int hot_x;
int hot_y; int hot_y;
}; };
std::map<jcursor_style_t, struct cursor_params_t> _cursors; std::map<jcursor_style_t, struct cursor_params_t> _cursors;
#endif #endif
std::vector<OffScreenImage *> _offscreenimages;
std::vector<Font *> _fonts;
Font *_default_font;
jthread::Mutex _mutex;
jcursor_style_t _cursor;
int r, int r,
g, g,
b, b,
a; a;
int screenWidth, int screenWidth,
screenHeight, screenHeight,
scaleWidth, scaleWidth,
scaleHeight; scaleHeight;
private: private:
friend class Font; /**
friend class OffScreenImage; * \brief
*
*/
GFXHandler();
std::vector<Font *> _fonts; /**
std::vector<OffScreenImage *> _offscreenimages; * \brief
*
*/
virtual void InitEngine();
/**
* \brief
*
*/
virtual void InitCursors();
/** /**
* \brief * \brief
* *
*/ */
void Add(Font *); void Add(Font *);
/** /**
* \brief * \brief
* *
skipping to change at line 166 skipping to change at line 174
/** /**
* \brief * \brief
* *
*/ */
virtual ~GFXHandler(); virtual ~GFXHandler();
/** /**
* \brief * \brief
* *
*/ */
static std::string GetID();
/**
* \brief
*
*/
static GFXHandler * GetInstance(); static GFXHandler * GetInstance();
/** /**
* \brief * \brief
* *
*/ */
static std::string GetID(); virtual void * GetGraphicEngine();
/** /**
* \brief * \brief
* *
*/ */
void * GetGraphicEngine(); virtual void SetDefaultFont(Font *font);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetWorkingScreenSize(int width, int height); virtual Font * GetDefaultFont();
/** /**
* \brief * \brief
* *
*/ */
virtual int GetScreenWidth(); virtual void SetWorkingScreenSize(int width, int height);
/** /**
* \brief * \brief
* *
*/ */
virtual int GetScreenHeight(); virtual int GetScreenWidth();
/** /**
* \brief * \brief
* *
*/ */
virtual jpoint_t GetMousePosition(); virtual int GetScreenHeight();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetMousePosition(int x, int y); virtual jpoint_t GetMousePosition();
/** /**
* \brief * \brief
* *
*/ */
virtual void InitCursors(); virtual void SetMousePosition(int x, int y);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetCursorEnabled(bool b); virtual void SetCursorEnabled(bool b);
/** /**
* \brief * \brief
* *
 End of changes. 17 change blocks. 
29 lines changed or deleted 43 lines changed or added


 jgraphics.h   jgraphics.h 
skipping to change at line 39 skipping to change at line 39
#include <vector> #include <vector>
#include <ctype.h> #include <ctype.h>
#include <string> #include <string>
#include <math.h> #include <math.h>
#include <list> #include <list>
#ifdef DIRECTFB_UI #ifdef DIRECTFB_UI
#include <directfb.h> #include <directfb.h>
#endif #endif
#define TRUNC_COLOR(red, green, blue, alpha) \ #define DEFAULT_SCALE_WIDTH 1920
if (red < 0) { \ #define DEFAULT_SCALE_HEIGHT 1080
red = 0; \
} #define DEFAULT_FONT_SIZE 20
\
#define TRUNC_COLOR(r, g, b, a) \
\ r = (r < 0)?0:(r > 0xff)?0xff:r; \
if (green < 0) { \ g = (g < 0)?0:(g > 0xff)?0xff:g; \
green = 0; \ b = (b < 0)?0:(b > 0xff)?0xff:b; \
} a = (a < 0)?0:(a > 0xff)?0xff:a; \
\
\
if (blue < 0) { \
blue = 0; \
}
\
\
if (alpha < 0) { \
alpha = 0; \
}
\
\
if (red > 0xff) { \
red = 0xff; \
}
\
\
if (green > 0xff) { \
green = 0xff; \
}
\
\
if (blue > 0xff) { \
blue = 0xff; \
}
\
\
if (alpha > 0xff) { \
alpha = 0xff; \
}
\
#define SCALE_TO_SCREEN(x, y, z) \ #define SCALE_TO_SCREEN(x, y, z) \
(int)floor(((double)x*(double)y)/(double)z) (int)floor(((double)x*(double)y)/(double)z)
#define SCREEN_TO_SCALE(x, z, y) \ #define SCREEN_TO_SCALE(x, z, y) \
(int)floor(((double)x*(double)y)/(double)z) (int)floor(((double)x*(double)y)/(double)z)
#define DEFAULT_SCALE_WIDTH 1920
#define DEFAULT_SCALE_HEIGHT 1080
namespace jgui{ namespace jgui{
/** /**
* \brief * \brief
* *
*/ */
enum jporter_duff_flags_t { enum jporter_duff_flags_t {
PDF_NONE = 0x0001, // fs: sa fd: 1.0-sa (defaults) PDF_NONE = 0x0001, // fs: sa fd: 1.0-sa (defaults)
PDF_CLEAR = 0x0002, // fs: 0.0 fd: 0.0 PDF_CLEAR = 0x0002, // fs: 0.0 fd: 0.0
PDF_SRC = 0x0004, // fs: 1.0 fd: 0.0 PDF_SRC = 0x0004, // fs: 1.0 fd: 0.0
skipping to change at line 132 skipping to change at line 107
BF_DEINTERLACE = 0x10, BF_DEINTERLACE = 0x10,
BF_SRC_COLORKEY = 0x20, BF_SRC_COLORKEY = 0x20,
BF_DST_COLORKEY = 0x40, BF_DST_COLORKEY = 0x40,
BF_XOR = 0x80 BF_XOR = 0x80
}; };
/** /**
* \brief * \brief
* *
*/ */
enum jhorizontal_align_t {
LEFT_HALIGN,
CENTER_HALIGN,
RIGHT_HALIGN,
JUSTIFY_HALIGN
};
/**
* \brief
*
*/
enum jvertical_align_t {
TOP_VALIGN,
CENTER_VALIGN,
BOTTOM_VALIGN,
JUSTIFY_VALIGN
};
/**
* \brief
*
*/
enum jline_type_t { enum jline_type_t {
RECT_LINE = 0x01, RECT_LINE = 0x01,
ROUND_LINE = 0x02 ROUND_LINE = 0x02
}; };
/** /**
* \brief * \brief
* *
*/ */
enum jline_style_t { enum jline_style_t {
SOLID_LINE = 0x01, SOLID_LINE = 0x01,
DASH_LINE = 0x02, DASH_LINE = 0x02,
DASH_DOT_LINE = 0x04, DASH_DOT_LINE = 0x04,
DOT_LINE = 0x08 DOT_LINE = 0x08
}; };
/** /**
* \brief * \brief
* *
*/ */
enum jalign_t {
LEFT_ALIGN,
CENTER_ALIGN,
RIGHT_ALIGN,
JUSTIFY_ALIGN
};
/**
* \brief
*
*/
struct jpoint_t { struct jpoint_t {
int x; int x;
int y; int y;
}; };
/** /**
* \brief * \brief
* *
*/ */
struct jsize_t { struct jsize_t {
skipping to change at line 262 skipping to change at line 248
private: private:
struct edge_t { struct edge_t {
int yUpper; int yUpper;
double xIntersect; double xIntersect;
double dxPerScan; double dxPerScan;
struct edge_t *next; struct edge_t *next;
}; };
private: private:
static Font *_default_font;
jthread::Mutex graphics_mutex; jthread::Mutex graphics_mutex;
#ifdef DIRECTFB_UI #ifdef DIRECTFB_UI
IDirectFBSurface *surface; IDirectFBSurface *surface;
#endif #endif
struct jregion_t _clip; struct jregion_t _clip;
struct jpoint_t _translate; struct jpoint_t _translate;
struct jsize_t _screen; struct jsize_t _screen;
struct jsize_t _scale; struct jsize_t _scale;
skipping to change at line 308 skipping to change at line 292
/** /**
* \brief * \brief
* *
*/ */
virtual ~Graphics(); virtual ~Graphics();
/** /**
* \brief * \brief
* *
*/ */
static void SetDefaultFont(Font *font);
/**
* \brief
*
*/
static Font * GetDefaultFont();
/**
* \brief
*
*/
virtual void * GetNativeSurface(); virtual void * GetNativeSurface();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetNativeSurface(void *surface); virtual void SetNativeSurface(void *surface);
/** /**
* \brief * \brief
skipping to change at line 680 skipping to change at line 652
/** /**
* \brief * \brief
* *
*/ */
virtual void DrawString(std::string s, int x, int y); virtual void DrawString(std::string s, int x, int y);
/** /**
* \brief * \brief
* *
*/ */
virtual void DrawString(std::string full_text, int x, int y, int width, int height, jalign_t align = JUSTIFY_ALIGN); virtual void DrawString(std::string full_text, int x, int y, int width, int height, jhorizontal_align_t halign = JUSTIFY_HALIGN, jverti cal_align_t valign = CENTER_VALIGN);
/** /**
* \brief * \brief
* *
*/ */
virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf f000000); virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf f000000);
/** /**
* \brief * \brief
* *
skipping to change at line 716 skipping to change at line 688
/** /**
* \brief * \brief
* *
*/ */
virtual void Reset(); virtual void Reset();
/** /**
* \brief * \brief
* *
*/ */
void Lock(); virtual void Lock();
/** /**
* \brief * \brief
* *
*/ */
void Unlock(); virtual void Unlock();
}; };
} }
#endif #endif
 End of changes. 9 change blocks. 
78 lines changed or deleted 35 lines changed or added


 jgridbaglayout.h   jgridbaglayout.h 
skipping to change at line 287 skipping to change at line 287
this->descent = 0; this->descent = 0;
this->centerPadding = 0; this->centerPadding = 0;
this->centerOffset = 0; this->centerOffset = 0;
this->baselineResizeBehavior = CB_OTHER; this->baselineResizeBehavior = CB_OTHER;
} }
virtual ~GridBagConstraints() virtual ~GridBagConstraints()
{ {
} }
bool IsVerticallyResizable() virtual bool IsVerticallyResizable()
{ {
return (fill == GBLC_BOTH || fill == GBLC_VERTICAL); return (fill == GBLC_BOTH || fill == GBLC_VERTICAL);
} }
}; };
class GridBagLayoutInfo { class GridBagLayoutInfo{
public: public:
int width, int width,
height; // number of cells: horizontal and vertical height; // number of cells: horizontal and vertical
int startx, int startx,
starty; // starting point for layout starty; // starting point for layout
int *minWidth, // largest minWidth in each column int *minWidth, // largest minWidth in each column
*minHeight, // largest minHeight in each row *minHeight, // largest minHeight in each row
*maxAscent, // Max ascent (baseline ) *maxAscent, // Max ascent (baseline )
*maxDescent; // Max descent (height - baseli ne) *maxDescent; // Max descent (height - baseli ne)
skipping to change at line 372 skipping to change at line 372
if (weightY != NULL) { if (weightY != NULL) {
delete weightY; delete weightY;
} }
if (baselineType != NULL) { if (baselineType != NULL) {
delete baselineType; delete baselineType;
} }
} }
bool HasConstantDescent(int row) virtual bool HasConstantDescent(int row)
{ {
int ordinal = 0; // TODO:: Component.BaselineResizeB ehavior.CONSTANT_DESCENT.ordinal(); int ordinal = 0; // TODO:: Component.BaselineResizeB ehavior.CONSTANT_DESCENT.ordinal();
return ((baselineType[row] & (1 << ordinal)) != 0); return ((baselineType[row] & (1 << ordinal)) != 0);
} }
bool HasBaseline(int row) virtual bool HasBaseline(int row)
{ {
return (hasBaseline && baselineType[row] != 0); return (hasBaseline && baselineType[row] != 0);
} }
}; };
class GridBagLayout : public Layout{ class GridBagLayout : public Layout{
private: private:
std::map<Component *, GridBagConstraints *> comptable; std::map<Component *, GridBagConstraints *> comptable;
GridBagConstraints *defaultConstraints; GridBagConstraints *defaultConstraints;
skipping to change at line 415 skipping to change at line 415
/** /**
* \brief * \brief
* *
*/ */
virtual ~GridBagLayout(); virtual ~GridBagLayout();
/** /**
* \brief * \brief
* *
*/ */
void SetConstraints(Component *comp, GridBagConstraints *con straints); virtual void SetConstraints(Component *comp, GridBagConstrai nts *constraints);
/** /**
* \brief * \brief
* *
*/ */
GridBagConstraints * GetConstraints(Component *comp); virtual GridBagConstraints * GetConstraints(Component *comp) ;
/** /**
* \brief * \brief
* *
*/ */
GridBagConstraints * LookupConstraints(Component *comp); virtual GridBagConstraints * LookupConstraints(Component *co mp);
/** /**
* \brief * \brief
* *
*/ */
void RemoveConstraints(Component *comp); virtual void RemoveConstraints(Component *comp);
/** /**
* \brief * \brief
* *
*/ */
jpoint_t GetLayoutOrigin(); virtual jpoint_t GetLayoutOrigin();
/** /**
* \brief * \brief
* *
*/ */
void AddLayoutComponent(Component *comp, GridBagConstraints *constraints); virtual void AddLayoutComponent(Component *comp, GridBagCons traints *constraints);
/** /**
* \brief * \brief
* *
*/ */
void RemoveLayoutComponent(Component *comp); virtual void RemoveLayoutComponent(Component *comp);
/** /**
* \brief * \brief
* *
*/ */
GridBagLayoutInfo * GetLayoutInfo(Container *parent, int siz eflag); virtual GridBagLayoutInfo * GetLayoutInfo(Container *parent, int sizeflag);
/** /**
* \brief * \brief
* *
*/ */
int64_t * PreInitMaximumArraySizes(Container *parent); virtual int64_t * PreInitMaximumArraySizes(Container *parent );
/** /**
* \brief * \brief
* *
*/ */
bool CalculateBaseline(Component *c, GridBagConstraints *con straints, jsize_t size); virtual bool CalculateBaseline(Component *c, GridBagConstrai nts *constraints, jsize_t size);
/** /**
* \brief * \brief
* *
*/ */
void AdjustForGravity(GridBagConstraints *constraints, jregi on_t *r); virtual void AdjustForGravity(GridBagConstraints *constraint s, jregion_t *r);
/** /**
* \brief * \brief
* *
*/ */
void AlignOnBaseline(GridBagConstraints *cons, jregion_t *r, int cellY, int cellHeight); virtual void AlignOnBaseline(GridBagConstraints *cons, jregi on_t *r, int cellY, int cellHeight);
/** /**
* \brief * \brief
* *
*/ */
void AlignAboveBaseline(GridBagConstraints *cons, jregion_t *r, int cellY, int cellHeight); virtual void AlignAboveBaseline(GridBagConstraints *cons, jr egion_t *r, int cellY, int cellHeight);
/** /**
* \brief * \brief
* *
*/ */
void AlignBelowBaseline(GridBagConstraints *cons, jregion_t *r, int cellY, int cellHeight); virtual void AlignBelowBaseline(GridBagConstraints *cons, jr egion_t *r, int cellY, int cellHeight);
/** /**
* \brief * \brief
* *
*/ */
void CenterVertically(GridBagConstraints *cons, jregion_t *r , int cellHeight); virtual void CenterVertically(GridBagConstraints *cons, jreg ion_t *r, int cellHeight);
/** /**
* \brief * \brief
* *
*/ */
jsize_t GetMinSize(Container *parent, GridBagLayoutInfo *inf o); virtual jsize_t GetMinSize(Container *parent, GridBagLayoutI nfo *info);
/** /**
* \brief * \brief
* *
*/ */
void ArrangeGrid(Container *parent); virtual void ArrangeGrid(Container *parent);
/** /**
* \brief * \brief
* *
*/ */
virtual jsize_t GetMinimumLayoutSize(Container *parent); virtual jsize_t GetMinimumLayoutSize(Container *parent);
/** /**
* \brief * \brief
* *
 End of changes. 21 change blocks. 
21 lines changed or deleted 21 lines changed or added


 jgridlayout.h   jgridlayout.h 
skipping to change at line 61 skipping to change at line 61
/** /**
* \brief * \brief
* *
*/ */
virtual ~GridLayout(); virtual ~GridLayout();
/** /**
* \brief * \brief
* *
*/ */
int GetRows(); virtual int GetRows();
/** /**
* \brief * \brief
* *
*/ */
int GetColumns(); virtual int GetColumns();
/** /**
* \brief * \brief
* *
*/ */
int GetHorizontalGap(); virtual int GetHorizontalGap();
/** /**
* \brief * \brief
* *
*/ */
int GetVerticalGap(); virtual int GetVerticalGap();
/** /**
* \brief * \brief
* *
*/ */
void SetRows(int rows); virtual void SetRows(int rows);
/** /**
* \brief * \brief
* *
*/ */
void SetColumns(int cols); virtual void SetColumns(int cols);
/** /**
* \brief * \brief
* *
*/ */
void SetHorizontalGap(int hgap); virtual void SetHorizontalGap(int hgap);
/** /**
* \brief * \brief
* *
*/ */
void SetVerticalGap(int vgap); virtual void SetVerticalGap(int vgap);
/** /**
* \brief * \brief
* *
*/ */
virtual jsize_t GetMinimumLayoutSize(Container *parent); virtual jsize_t GetMinimumLayoutSize(Container *parent);
/** /**
* \brief * \brief
* *
 End of changes. 8 change blocks. 
8 lines changed or deleted 8 lines changed or added


 jicon.h   jicon.h 
skipping to change at line 42 skipping to change at line 42
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Icon : public jgui::Component{ class Icon : public jgui::Component{
private: private:
jgui::OffScreenImage *_image; jgui::OffScreenImage *_image;
std::string _file, std::string _file,
_text; _text;
int _scale_width, jhorizontal_align_t _halign;
_scale_height; jvertical_align_t _valign;
bool _wrap;
public: public:
/** /**
* \brief * \brief
* *
*/ */
Icon(std::string, int x = 0, int y = 0, int width = 0, int h eight = 0, int scale_width = DEFAULT_SCALE_WIDTH, int scale_height = DEFAUL T_SCALE_HEIGHT); Icon(std::string, int x = 0, int y = 0, int width = 0, int h eight = 0);
/** /**
* \brief * \brief
* *
*/ */
virtual ~Icon(); virtual ~Icon();
/** /**
* \brief * \brief
* *
*/ */
void SetText(std::string text); virtual void SetText(std::string text);
/** /**
* \brief * \brief
* *
*/ */
void SetImage(std::string file); virtual std::string GetText();
/**
* \brief
*
*/
virtual void SetImage(std::string file);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetSize(int width, int height); virtual void SetSize(int width, int height);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetHorizontalAlign(jhorizontal_align_t align);
/**
* \brief
*
*/
virtual jhorizontal_align_t GetHorizontalAlign();
/**
* \brief
*
*/
virtual void SetVerticalAlign(jvertical_align_t align);
/**
* \brief
*
*/
virtual jvertical_align_t GetVerticalAlign();
/**
* \brief
*
*/
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
}; };
} }
#endif #endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 36 lines changed or added


 jimagebutton.h   jimagebutton.h 
skipping to change at line 55 skipping to change at line 55
OffScreenImage *prefetch1, OffScreenImage *prefetch1,
*prefetch2; *prefetch2;
std::string _image, std::string _image,
_image_focus; _image_focus;
public: public:
/** /**
* \brief * \brief
* *
*/ */
ImageButton(std::string image, std::string label, int x = 0, int y = 0, int width = 0, int height = 0); ImageButton(std::string label, std::string image, int x = 0, int y = 0, int width = DEFAULT_COMPONENT_WIDTH, int height = DEFAULT_COMPO NENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~ImageButton(); virtual ~ImageButton();
/** /**
* \brief * \brief
* *
*/ */
void SetImage(std::string image); virtual void SetImage(std::string image);
/** /**
* \brief * \brief
* *
*/ */
void SetImageFocus(std::string image); virtual void SetImageFocus(std::string image);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetSize(int width, int height); virtual void SetSize(int width, int height);
/** /**
* \brief * \brief
* *
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 jindexedbuffer.h   jindexedbuffer.h 
skipping to change at line 30 skipping to change at line 30
#ifndef J_INDEXEDBUFFER_H #ifndef J_INDEXEDBUFFER_H
#define J_INDEXEDBUFFER_H #define J_INDEXEDBUFFER_H
#include "jsemaphore.h" #include "jsemaphore.h"
#include "jcondition.h" #include "jcondition.h"
#include "jmutex.h" #include "jmutex.h"
#include "jobject.h" #include "jobject.h"
#include <cstring> #include <cstring>
#include <stdint.h>
#include <limits.h>
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#else #else
#endif #endif
#define MAX_BUFFER_SIZE 1048576 #define MAX_BUFFER_SIZE 1048576
#define MIN_CHUNK_SIZE 1024 #define MIN_CHUNK_SIZE 1024
#define MAX_CHUNK_SIZE 1048576 #define MAX_CHUNK_SIZE INT_MAX
namespace jthread { namespace jthread {
/** /**
* \brief * \brief
* *
*/ */
enum jbuffer_type_t { enum jbuffer_type_t {
BUFFER_BLOCK, BUFFER_BLOCK,
BUFFER_NONBLOCK BUFFER_NONBLOCK
}; };
/** /**
* \brief Buffer node. * \brief Buffer node.
* *
*/ */
struct jringbuffer_t { struct jringbuffer_t {
uint8_t*data; // buffer uint8_t *data; // buffer
int size; // size of buffer int size; // size of buffer
}; };
/** /**
* \brief IndexedBuffer. * \brief IndexedBuffer.
* *
* WARNNING:: add -DSINGLE_WAIT_CONDITION to Makefile flags * WARNNING:: add -DSINGLE_WAIT_CONDITION to Makefile flags
* *
* @author Jeff Ferr * @author Jeff Ferr
*/ */
skipping to change at line 93 skipping to change at line 96
Mutex _mutex; Mutex _mutex;
#ifdef _WIN32 #ifdef _WIN32
/** \brief */ /** \brief */
Semaphore _semaphore; Semaphore _semaphore;
#else #else
/** \brief */ /** \brief */
Condition _semaphore; Condition _semaphore;
#endif #endif
public: public:
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
IndexedBuffer(int size = 256, int chunk = MIN_CHUNK_SIZE, jbuffer_t IndexedBuffer(int size = 256, int chunk = MIN_CHUNK_SIZE, jb
ype_t type = BUFFER_BLOCK); uffer_type_t type = BUFFER_BLOCK);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~IndexedBuffer(); virtual ~IndexedBuffer();
/** /**
* \brief * \brief
* *
*/ */
void Reset(); void Reset();
/** /**
* \brief * \brief
* *
*/ */
void Release(); void Release();
/**
* \brief
*
*/
void SetChunkSize(int size);
/**
* \brief
*
*/
void SetNodesSize(int size);
/**
* \brief
*
*/
int GetChunkSize();
/**
* \brief
*
*/
int GetNodesSize();
/** /**
* \brief * \brief
* *
*/ */
int GetIndex(int *rindex, int *pindex); int GetIndex(int *rindex, int *pindex);
/** /**
* \brief Returns the current size of buffer. * \brief Returns the current size of buffer.
* *
* \return -1 caso os indices sejam invalidos, 0 caso esteja vazio, caso contrario * \return -1 caso os indices sejam invalidos, 0 caso esteja vazio, caso contrario
* retorna o tamanho atual do buffer. * retorna o tamanho atual do buffer.
* *
*/ */
int GetAvailable(int *rindex, int *pindex); int GetAvailable(int *rindex, int *pindex);
/** /**
* \brief Read a chunk. * \brief Read a chunk.
* *
* \param data Data deve conter no minimo o tamanho de chunk . A funcao retorna o tamanho lido em size. * \param data Data deve conter no minimo o tamanho de chunk . A funcao retorna o tamanho lido em size.
* *
*/ */
int Read(jringbuffer_t *data, int *rindex, int *pindex); int Read(jringbuffer_t *data, int *rindex, int *pindex);
/** /**
* \brief * \brief
* *
*/ */
int Write(const uint8_t*data, int size); int Write(uint8_t *data, int size);
/** /**
* \brief * \brief
* *
*/ */
int Write(jringbuffer_t *data); int Write(jringbuffer_t *data);
}; };
} }
#endif #endif
 End of changes. 13 change blocks. 
43 lines changed or deleted 70 lines changed or added


 jinputdialogbox.h   jinputdialogbox.h 
skipping to change at line 75 skipping to change at line 75
/** /**
* \brief * \brief
* *
*/ */
virtual ~InputDialogBox(); virtual ~InputDialogBox();
/** /**
* \brief * \brief
* *
*/ */
std::string GetText(); virtual std::string GetText();
/** /**
* \brief * \brief
* *
*/ */
void ActionPerformed(jgui::ButtonEvent *event); virtual void SetHorizontalAlign(jhorizontal_align_t align);
/**
* \brief
*
*/
virtual jhorizontal_align_t GetHorizontalAlign();
/**
* \brief
*
*/
virtual void SetVerticalAlign(jvertical_align_t align);
/**
* \brief
*
*/
virtual jvertical_align_t GetVerticalAlign();
/**
* \brief
*
*/
virtual void ActionPerformed(jgui::ButtonEvent *event);
}; };
} }
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 26 lines changed or added


 jinputmanager.h   jinputmanager.h 
skipping to change at line 65 skipping to change at line 65
_event = NULL; _event = NULL;
} }
static void ProcessEvent(KeyListener *listener, KeyEvent *ev ent) static void ProcessEvent(KeyListener *listener, KeyEvent *ev ent)
{ {
listener->KeyPressed(event); listener->KeyPressed(event);
delete event; delete event;
} }
void SetListener(KeyListener *listener, KeyEvent *event) virtual void SetListener(KeyListener *listener, KeyEvent *ev ent)
{ {
_listener = listener; _listener = listener;
_event = event; _event = event;
} }
virtual void Run() virtual void Run()
{ {
KeyProcess::ProcessEvent(_listener, _event); KeyProcess::ProcessEvent(_listener, _event);
} }
skipping to change at line 112 skipping to change at line 112
listener->MouseReleased(event); listener->MouseReleased(event);
} else if (event->GetType() == JMOUSE_MOVED_EVENT) { } else if (event->GetType() == JMOUSE_MOVED_EVENT) {
listener->MouseMoved(event); listener->MouseMoved(event);
} else if (event->GetType() == JMOUSE_WHEEL_EVENT) { } else if (event->GetType() == JMOUSE_WHEEL_EVENT) {
listener->MouseWheel(event); listener->MouseWheel(event);
} }
delete event; delete event;
} }
void SetListener(MouseListener *listener, MouseEvent *event) virtual void SetListener(MouseListener *listener, MouseEvent *event)
{ {
_listener = listener; _listener = listener;
_event = event; _event = event;
} }
virtual void Run() virtual void Run()
{ {
MouseProcess::ProcessEvent(_listener, _event); MouseProcess::ProcessEvent(_listener, _event);
} }
skipping to change at line 195 skipping to change at line 195
/** /**
* \brief * \brief
* *
*/ */
static InputManager * GetInstance(); static InputManager * GetInstance();
/** /**
* \brief * \brief
* *
*/ */
void SetWorkingScreenSize(int width, int height); virtual void SetWorkingScreenSize(int width, int height);
/** /**
* \brief * \brief
* *
*/ */
void SkipKeyEvents(bool b); virtual void SkipKeyEvents(bool b);
/** /**
* \brief * \brief
* *
*/ */
void SkipMouseEvents(bool b); virtual void SkipMouseEvents(bool b);
/** /**
* \brief * \brief
* *
*/ */
void SetKeyEventsEnabled(bool b); virtual void SetKeyEventsEnabled(bool b);
/** /**
* \brief * \brief
* *
*/ */
void SetMouseEventsEnabled(bool b); virtual void SetMouseEventsEnabled(bool b);
/** /**
* \brief * \brief
* *
*/ */
bool IsKeyEventsEnabled(); virtual bool IsKeyEventsEnabled();
/** /**
* \brief * \brief
* *
*/ */
bool IsMouseEventsEnabled(); virtual bool IsMouseEventsEnabled();
/** /**
* \brief * \brief
* *
*/ */
void PostEvent(KeyEvent *event); virtual void PostEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void PostEvent(MouseEvent *event); virtual void PostEvent(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void RegisterKeyListener(KeyListener *listener); virtual void RegisterKeyListener(KeyListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void RemoveKeyListener(KeyListener *listener); virtual void RemoveKeyListener(KeyListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(KeyEvent *event); virtual void DispatchKeyEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<KeyListener *> & GetKeyListeners(); virtual std::vector<KeyListener *> & GetKeyListeners();
/** /**
* \brief * \brief
* *
*/ */
void RegisterMouseListener(MouseListener *listener); virtual void RegisterMouseListener(MouseListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void RemoveMouseListener(MouseListener *listener); virtual void RemoveMouseListener(MouseListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(MouseEvent *event); virtual void DispatchMouseEvent(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<MouseListener *> & GetMouseListeners(); virtual std::vector<MouseListener *> & GetMouseListeners();
/** /**
* \brief * \brief
* *
*/ */
void WaitEvents(); virtual void WaitEvents();
/** /**
* \brief * \brief
* *
*/ */
virtual void Run(); virtual void Run();
}; };
} }
 End of changes. 20 change blocks. 
20 lines changed or deleted 20 lines changed or added


 jinputstream.h   jinputstream.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_INPUTSTREAM_H #ifndef J_INPUTSTREAM_H
#define J_INPUTSTREAM_H #define J_INPUTSTREAM_H
#include "jinputstream.h" #include "jinputstream.h"
#include "jobject.h" #include "jobject.h"
#include <stdint.h>
#include <stdio.h>
namespace jio { namespace jio {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class InputStream : public virtual jcommon::Object{ class InputStream : public virtual jcommon::Object{
private: private:
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added


 jkeyboard.h   jkeyboard.h 
skipping to change at line 62 skipping to change at line 62
FULL_WEB_KEYBOARD FULL_WEB_KEYBOARD
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Keyboard : public jgui::Frame, public jgui::ButtonListener, public jg ui::FrameInputListener, public jgui::TextListener { class Keyboard : public jgui::Frame, public jgui::ButtonListener, public jg ui::FrameInputListener, public jgui::TextListener {
public:
private: private:
jthread::Mutex _key_mutex; jthread::Mutex _key_mutex;
std::vector<KeyboardListener *> _keyboard_listeners; std::vector<KeyboardListener *> _keyboard_listeners;
std::vector<Button *> _buttons; std::vector<Button *> _buttons;
TextArea *display; TextArea *display;
Component *_current_button; Component *_current_button;
jkeyboard_type_t _type; jkeyboard_type_t _type;
std::string _text; std::string _text;
skipping to change at line 86 skipping to change at line 85
bheight, bheight,
_state; _state;
float delta; float delta;
bool started, bool started,
_shift_pressed, _shift_pressed,
_show_text, _show_text,
_response, _response,
_input_locked, _input_locked,
_is_password; _is_password;
public: private:
/** /**
* \brief * \brief
* *
*/ */
Keyboard(int x, int y, jkeyboard_type_t type, bool text_visi ble = true, bool is_password = false); void BuildWebKeyboard();
/** /**
* \brief * \brief
* *
*/ */
virtual ~Keyboard(); void BuildFullAlphaNumericKeyboard();
/** /**
* \brief * \brief
* *
*/ */
void BuildWebKeyboard(); void BuildSmallAlphaNumericKeyboard();
/** /**
* \brief * \brief
* *
*/ */
void BuildFullAlphaNumericKeyboard(); void BuildFullNumericKeyboard();
/** /**
* \brief * \brief
* *
*/ */
void BuildSmallAlphaNumericKeyboard(); void BuildSmallNumericKeyboard();
public:
/** /**
* \brief * \brief
* *
*/ */
void BuildFullNumericKeyboard(); Keyboard(int x, int y, jkeyboard_type_t type, bool text_visi ble = true, bool is_password = false);
/** /**
* \brief * \brief
* *
*/ */
void BuildSmallNumericKeyboard(); virtual ~Keyboard();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetMaxTextSize(int max); virtual void SetTextSize(int max);
/** /**
* \brief * \brief
* *
*/ */
virtual void Clear(); virtual int GetTextSize();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetWrap(bool b); virtual void SetWrap(bool b);
/** /**
* \brief * \brief
* *
skipping to change at line 187 skipping to change at line 187
/** /**
* \brief * \brief
* *
*/ */
virtual void TextChanged(TextEvent *event); virtual void TextChanged(TextEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<KeyboardListener *> & GetKeyboardListeners(); virtual std::vector<KeyboardListener *> & GetKeyboardListene rs();
/** /**
* \brief * \brief
* *
*/ */
void RegisterKeyboardListener(KeyboardListener *listener); virtual void RegisterKeyboardListener(KeyboardListener *list ener);
/** /**
* \brief * \brief
* *
*/ */
void RemoveKeyboardListener(KeyboardListener *listener); virtual void RemoveKeyboardListener(KeyboardListener *listen er);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(KeyboardEvent *event); virtual void DispatchKeyboardEvent(KeyboardEvent *event);
}; };
} }
#endif #endif
 End of changes. 16 change blocks. 
15 lines changed or deleted 15 lines changed or added


 jkeyboardevent.h   jkeyboardevent.h 
skipping to change at line 68 skipping to change at line 68
/** /**
* \brief * \brief
* *
*/ */
virtual ~KeyboardEvent(); virtual ~KeyboardEvent();
/** /**
* \brief * \brief
* *
*/ */
std::string GetSymbol(); virtual std::string GetSymbol();
/** /**
* \brief * \brief
* *
*/ */
std::string GetText(); virtual std::string GetText();
}; };
} }
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jkeyevent.h   jkeyevent.h 
skipping to change at line 273 skipping to change at line 273
/** /**
* \brief * \brief
* *
*/ */
virtual ~KeyEvent(); virtual ~KeyEvent();
/** /**
* \brief * \brief
* *
*/ */
int GetKeyCode(); virtual int GetKeyCode();
/** /**
* \brief * \brief
* *
*/ */
jkey_symbol_t GetSymbol(); virtual jkey_symbol_t GetSymbol();
/** /**
* \brief * \brief
* *
*/ */
jkey_type_t GetType(); virtual jkey_type_t GetType();
/** /**
* \brief * \brief
* *
*/ */
jinput_modifiers_t GetModifiers(); virtual jinput_modifiers_t GetModifiers();
}; };
} }
#endif #endif
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 jlabel.h   jlabel.h 
skipping to change at line 45 skipping to change at line 45
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Label : public jgui::Component{ class Label : public jgui::Component{
private: private:
std::string _text; std::string _text;
jalign_t _align; jhorizontal_align_t _halign;
jvertical_align_t _valign;
bool _wrap; bool _wrap;
private:
/**
* \brief
*
*/
int CountLines(std::string text);
public: public:
/** /**
* \brief * \brief
* *
*/ */
Label(std::string text, int x = 0, int y = 0, int width = 0, int height = 0); Label(std::string text, int x = 0, int y = 0, int width = DE FAULT_COMPONENT_WIDTH, int height = DEFAULT_COMPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~Label(); virtual ~Label();
/** /**
* \brief * \brief
* *
*/ */
void SetWrap(bool b); virtual void SetText(std::string text);
/** /**
* \brief * \brief
* *
*/ */
void SetText(std::string text); virtual std::string GetText();
/** /**
* \brief * \brief
* *
*/ */
std::string GetText(); virtual void SetWrap(bool b);
/** /**
* \brief * \brief
* *
*/ */
void SetAlign(jalign_t align); virtual void SetHorizontalAlign(jhorizontal_align_t align);
/** /**
* \brief * \brief
* *
*/ */
jalign_t GetAlign(); virtual jhorizontal_align_t GetHorizontalAlign();
/**
* \brief
*
*/
virtual void SetVerticalAlign(jvertical_align_t align);
/**
* \brief
*
*/
virtual jvertical_align_t GetVerticalAlign();
/**
* \brief
*
*/
virtual jsize_t GetPreferredSize();
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
}; };
} }
 End of changes. 8 change blocks. 
7 lines changed or deleted 33 lines changed or added


 jlistbox.h   jlistbox.h 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_LISTBOX_H #ifndef J_LISTBOX_H
#define J_LISTBOX_H #define J_LISTBOX_H
#include "jbutton.h"
#include "jtextarea.h"
#include "jselectlistener.h" #include "jselectlistener.h"
#include "jcomponent.h" #include "jitemcomponent.h"
#include "jbuttonlistener.h" #include "jbuttonlistener.h"
#include "joffscreenimage.h" #include "joffscreenimage.h"
#include "jthread.h" #include "jthread.h"
#include "jmutex.h" #include "jmutex.h"
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
namespace jgui { namespace jgui {
/** /**
* \brief * \brief
* *
*/ */
enum jlist_item_type_t {
TEXT_ITEM,
IMAGE_ITEM,
EMPTY_ITEM
};
/**
* \brief
*
*/
enum jlist_scroll_type_t { enum jlist_scroll_type_t {
NONE_SCROLL, NONE_SCROLL,
SCROLL_ARROW, SCROLL_ARROW,
SCROLL_BAR SCROLL_BAR
}; };
/** /**
* \brief * \brief
* *
*/ */
skipping to change at line 78 skipping to change at line 66
NONE_SELECTION, NONE_SELECTION,
SINGLE_SELECTION, SINGLE_SELECTION,
MULTI_SELECTION MULTI_SELECTION
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class ListBox : public ButtonListener, public Component{ class ListBox : public jgui::ItemComponent{
private:
struct listbox_t {
std::string text;
bool check;
jlist_item_type_t type;
jgui::OffScreenImage *image;
};
private: private:
std::vector<SelectListener *> _listbox_listeners;
std::vector<listbox_t> _items;
int bx,
by,
bwidth,
bheight,
_item_size,
_index,
_top_index,
_selected_index;
jcolor_t _item_color;
float delta;
bool _input_locked,
_centered_interaction,
_loop;
jalign_t _align;
jlist_scroll_type_t _scroll; jlist_scroll_type_t _scroll;
jlist_selection_type_t _selection; jlist_selection_type_t _selection;
int _item_size,
_top_index,
_selected_index;
bool _input_locked,
_centered_interaction;
public: public:
/** /**
* \brief * \brief
* *
*/ */
ListBox(int x = 0, int y = 0, int width = 0, int height = 0) ; ListBox(int x = 0, int y = 0, int width = 0, int height = 0) ;
/** /**
* \brief * \brief
* *
*/ */
virtual ~ListBox(); virtual ~ListBox();
/** /**
* \brief * \brief
* *
*/ */
void SetCenteredInteraction(bool b); virtual void SetCenteredInteraction(bool b);
/**
* \brief
*
*/
void SetScrollType(jlist_scroll_type_t type);
/**
* \brief
*
*/
void SetSelectionType(jlist_selection_type_t type);
/**
* \brief
*
*/
int GetVisibleItems();
/**
* \brief
*
*/
void SetLoop(bool loop);
/** /**
* \brief * \brief
* *
*/ */
void SetAlign(jalign_t align); virtual void SetScrollType(jlist_scroll_type_t type);
/** /**
* \brief * \brief
* *
*/ */
jalign_t GetAlign(); virtual void SetSelectionType(jlist_selection_type_t type);
/** /**
* \brief * \brief
* *
*/ */
void SetCurrentIndex(int i); virtual int GetVisibleItems();
/** /**
* \brief * \brief
* *
*/ */
bool IsSelected(int i); virtual bool IsSelected(int i);
/** /**
* \brief Invert current selection state from item. Use with IsSelected() to avoid * \brief Invert current selection state from item. Use with IsSelected() to avoid
* unexpected states. * unexpected states.
* *
*/ */
void SetSelected(int i); virtual void SetSelected(int i);
/**
* \brief
*
*/
void Select(int i);
/**
* \brief
*
*/
void Deselect(int i);
/**
* \brief
*
*/
void AddEmptyItem();
/**
* \brief
*
*/
void AddItem(std::string text);
/**
* \brief
*
*/
void AddItem(std::string text, std::string image);
/**
* \brief
*
*/
std::string GetValue(int index);
/**
* \brief
*
*/
std::string GetCurrentValue();
/**
* \brief
*
*/
int GetCurrentIndex();
/**
* \brief
*
*/
int GetSelectedIndex();
/** /**
* \brief * \brief
* *
*/ */
int GetItemsSize(); virtual void Select(int i);
/** /**
* \brief * \brief
* *
*/ */
void RemoveItem(int index); virtual void Deselect(int i);
/** /**
* \brief * \brief
* *
*/ */
void RemoveAll(); virtual int GetSelectedIndex();
/** /**
* \brief * \brief
* *
*/ */
int GetItemSize(); virtual int GetItemSize();
/** /**
* \brief * \brief
* *
*/ */
void SetItemSize(int size); virtual void SetItemSize(int size);
/** /**
* \brief * \brief
* *
*/ */
jcolor_t GetItemColor(); virtual void SetCurrentIndex(int i);
/** /**
* \brief * \brief
* *
*/ */
void SetItemColor(jcolor_t color); virtual void SetForegroundColor(int red, int green, int blue , int alpha);
/** /**
* \brief * \brief
* *
*/ */
void SetItemColor(int red, int green, int blue, int alpha); virtual void SetForegroundFocusColor(int red, int green, int blue, int alpha);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual bool ProcessEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(MouseEvent *event); virtual bool ProcessEvent(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual jsize_t GetPreferredSize();
/**
* \brief
*
*/
void RegisterSelectListener(SelectListener *listener);
/**
* \brief
*
*/
void RemoveSelectListener(SelectListener *listener);
/**
* \brief
*
*/
void DispatchEvent(SelectEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<SelectListener *> & GetSelectListeners(); virtual void Paint(Graphics *g);
}; };
} }
#endif #endif
 End of changes. 22 change blocks. 
150 lines changed or deleted 23 lines changed or added


 jmarquee.h   jmarquee.h 
skipping to change at line 61 skipping to change at line 61
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Marquee : public Component, public jthread::Thread{ class Marquee : public Component, public jthread::Thread{
private: private:
std::string full_text; std::string _text;
jmarquee_type_t _type; jmarquee_type_t _type;
int _position, int _position,
_delta, _delta,
_fixe_delta, _interval,
_interval, _index;
_index;
bool _running; bool _running;
public: public:
/** /**
* \brief * \brief
* *
*/ */
Marquee(int x = 0, int y = 0, int width = 0, int height = 0) ; Marquee(std::string text, int x = 0, int y = 0, int width = DEFAULT_COMPONENT_WIDTH, int height = DEFAULT_COMPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~Marquee(); virtual ~Marquee();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetVisible(bool b); virtual void SetVisible(bool b);
/** /**
* \brief * \brief
* *
*/ */
void SetType(jmarquee_type_t type); virtual void SetType(jmarquee_type_t type);
/** /**
* \brief * \brief
* *
*/ */
void SetInterval(int i); virtual void SetInterval(int i);
/** /**
* \brief * \brief
* *
*/ */
void SetText(std::string text); virtual void SetText(std::string text);
/**
* \brief
*
*/
virtual std::string GetText();
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual void Run(); virtual void Run();
/** /**
* \brief * \brief
* *
*/ */
void Release(); virtual void Release();
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
10 lines changed or deleted 15 lines changed or added


 jmemoryinputstream.h   jmemoryinputstream.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_MEMORYINPUTSTREAM_H #ifndef J_MEMORYINPUTSTREAM_H
#define J_MEMORYINPUTSTREAM_H #define J_MEMORYINPUTSTREAM_H
#include "jinputstream.h" #include "jinputstream.h"
#include <stdint.h>
#include <cstring> #include <cstring>
namespace jio { namespace jio {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class MemoryInputStream : public jio::InputStream{ class MemoryInputStream : public jio::InputStream{
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jmenu.h   jmenu.h 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_MENU_H #ifndef J_MENU_H
#define J_MENU_H #define J_MENU_H
#include "jmenulistener.h"
#include "jframe.h" #include "jframe.h"
#include "jlistbox.h" #include "jframeinputlistener.h"
#include "jmenuexception.h"
#include "joffscreenimage.h" #include "joffscreenimage.h"
#include "jmouselistener.h" #include "jmouselistener.h"
#include "jitemcomponent.h"
#include "jthememanager.h"
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
namespace jgui { namespace jgui {
skipping to change at line 52 skipping to change at line 52
* *
*/ */
enum jmenu_align_t { enum jmenu_align_t {
MENU_ALIGN, MENU_ALIGN,
SUBMENU_ALIGN SUBMENU_ALIGN
}; };
/** /**
* \brief * \brief
* *
*/
enum jmenuitem_type_t {
TEXT_MENU_ITEM,
IMAGE_MENU_ITEM,
CHECK_MENU_ITEM,
EMPTY_MENU_ITEM
};
class MenuItem;
class MenuComponent;
class ComboMenuComponent;
/**
* \brief
*
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Menu : public jgui::Frame, public jgui::FrameInputListener{ class Menu : public jgui::ItemComponent, public jgui::FrameInputListener, p
ublic jgui::ThemeListener{
friend class MenuComponent;
private: private:
jthread::Mutex _menu_mutex; jthread::Mutex _menu_mutex;
jthread::Condition _menu_sem;
std::vector<Menu *> _menus; std::vector<Menu *> _menus;
std::vector<MenuListener *> _menu_listeners; jgui::Frame *_frame;
MenuItem *_current_item; jgui::OffScreenImage *prefetch;
MenuComponent *_list;
jmenu_align_t _menu_align; jmenu_align_t _menu_align;
int _visible_items; std::string _title;
int _top_index,
_item_size,
_visible_items,
_centered_interaction;
private: private:
/**
* \brief
*
*/
virtual void MousePressed(MouseEvent *event); virtual void MousePressed(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseReleased(MouseEvent *event); virtual void MouseReleased(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseClicked(MouseEvent *event); virtual void MouseClicked(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseMoved(MouseEvent *event); virtual void MouseMoved(MouseEvent *event);
/**
* \brief
*
*/
virtual void MouseWheel(MouseEvent *event); virtual void MouseWheel(MouseEvent *event);
public: public:
/**
* \brief
*
*/
Menu(int x, int y, int width, int visible_items); Menu(int x, int y, int width, int visible_items);
/**
* \brief
*
*/
virtual ~Menu(); virtual ~Menu();
/**
* \brief
*
*/
virtual void SetTitle(std::string title); virtual void SetTitle(std::string title);
virtual bool Show(bool modal = true);
void SetMenuAlign(jmenu_align_t align);
int GetItemsSize();
int GetVisibleItems();
void SetLoop(bool loop);
void SetCurrentIndex(int i);
void AddMenuItem(MenuItem *item);
void AddMenuItem(MenuItem *item, int index);
void AddMenuItems(std::vector<MenuItem *> &items);
Menu * GetCurrentMenu();
MenuItem * GetCurrentItem();
int GetCurrentIndex();
void RemoveAll();
jcolor_t GetItemColor(); /**
* \brief
void SetItemColor(jcolor_t color); *
void SetBackgroundColor(jcolor_t color); */
void SetForegroundColor(jcolor_t color); virtual void SetBounds(int x, int y, int w, int h);
void SetItemColor(int red, int green, int blue, int alpha);
void SetBackgroundColor(int red, int green, int blue, int al
pha);
void SetForegroundColor(int red, int green, int blue, int al
pha);
void RegisterMenuListener(MenuListener *listener);
void RemoveMenuListener(MenuListener *listener);
void DispatchEvent(MenuEvent *event);
std::vector<MenuListener *> & GetMenuListeners();
virtual void Paint(Graphics *g);
virtual void InputChanged(KeyEvent *event);
};
class MenuItem : public virtual jcommon::Object{
friend class MenuComponent; /**
friend class ComboMenuComponent; * \brief
*
*/
virtual void SetLocation(int x, int y);
private: /**
std::vector<MenuItem *> _childs; * \brief
Menu *_parent; *
OffScreenImage *_prefetch; */
std::string _value, virtual void SetSize(int w, int h);
_image;
jmenuitem_type_t _type;
bool _is_checked,
_is_visible,
_enabled;
public: /**
MenuItem() * \brief
{ *
jcommon::Object::SetClassName("jcommon::MenuItem"); */
virtual void Move(int x, int y);
_enabled = true; /**
_parent = NULL; * \brief
_prefetch = NULL; *
_is_checked = false; */
_is_visible = true; virtual jpoint_t GetLocation();
_type = EMPTY_MENU_ITEM;
}
MenuItem(std::string value) /**
{ * \brief
jcommon::Object::SetClassName("jcommon::MenuItem"); *
*/
virtual jsize_t GetSize();
_enabled = true; /**
_parent = NULL; * \brief
_prefetch = NULL; *
_value = value; */
_is_checked = false; virtual int GetX();
_is_visible = true;
_type = TEXT_MENU_ITEM;
}
MenuItem(std::string value, std::string image) /**
{ * \brief
jcommon::Object::SetClassName("jcommon::MenuItem"); *
*/
virtual int GetY();
_enabled = true; /**
_parent = NULL; * \brief
_prefetch = NULL; *
_image = image; */
_value = value; virtual int GetWidth();
_is_checked = false;
_is_visible = true;
_type = IMAGE_MENU_ITEM;
}
MenuItem(std::string value, bool checked) /**
{ * \brief
jcommon::Object::SetClassName("jcommon::MenuItem"); *
*/
virtual int GetHeight();
_enabled = true; /**
_parent = NULL; * \brief
_prefetch = NULL; *
_value = value; */
_is_checked = checked; virtual bool Show(bool modal = true);
_is_visible = true;
_type = CHECK_MENU_ITEM;
}
~MenuItem() /**
{ * \brief
} *
*/
virtual bool Hide();
Menu * GetParent() /**
{ * \brief
return _parent; *
} */
virtual void Release();
std::vector<MenuItem *> & GetSubItems() /**
{ * \brief
return _childs; *
} */
virtual void SetCenteredInteraction(bool b);
void SetEnabled(bool b) /**
{ * \brief
_enabled = b; *
} */
virtual void SetMenuAlign(jmenu_align_t align);
bool GetEnabled() /**
{ * \brief
return _enabled; *
} */
virtual int GetVisibleItems();
void SetVisible(bool b) /**
{ * \brief
_is_visible = b; *
} */
virtual Menu * GetCurrentMenu();
bool IsVisible() /**
{ * \brief
return _is_visible; *
} */
virtual void SetItemColor(int red, int green, int blue, int
alpha);
bool IsSelected() /**
{ * \brief
return _is_checked; *
} */
virtual void SetItemForegroundColor(int red, int green, int
blue, int alpha);
void SetSelected(bool b) /**
{ * \brief
if (_is_checked == b) { *
return; */
} virtual void SetBackgroundColor(int red, int green, int blue
, int alpha);
_is_checked = b; /**
* \brief
*
*/
virtual void SetForegroundColor(int red, int green, int blue
, int alpha);
/* /*
if (_parent != NULL) { * \brief
_parent->Repaint(); *
} */
*/ virtual void SetCurrentIndex(int i);
}
void SetParent(Menu *parent)
{
_parent = parent;
}
void AddSubItem(MenuItem *item)
{
if (_type == jgui::CHECK_MENU_ITEM) {
throw MenuException("Item cannot accept childs");
}
_childs.push_back(item);
}
void AddSubItem(MenuItem *item, int index)
{
if (index > (int)_childs.size()) {
index = _childs.size();
}
_childs.insert(_childs.begin()+index, item);
}
void AddSubItems(std::vector<MenuItem *> items)
{
for (std::vector<MenuItem *>::iterator i=items.begin(); i!=i
tems.end(); i++) {
_childs.push_back((*i));
}
}
void RemoveSubItem(int index)
{
if (_childs.size() > 0 && index < (int)_childs.size()) {
_childs.erase(_childs.begin()+index);
}
}
void RemoveSubItem(MenuItem *item)
{
std::vector<MenuItem *>::iterator i = std::find(_childs.begi
n(), _childs.end(), item);
if (i != _childs.end()) {
_childs.erase(i);
}
}
std::string GetValue()
{
return _value;
}
std::string GetImage()
{
return _image;
}
jmenuitem_type_t GetType()
{
return _type;
}
}; /*
* \brief
*
*/
virtual Item * GetCurrentItem();
class MenuComponent : public Component{ /**
* \brief
*
*/
virtual int GetCurrentIndex();
friend class Menu; /**
* \brief
*
*/
virtual void Repaint();
private: /**
std::vector<MenuItem *>_items; * \brief
OffScreenImage *prefetch; *
Menu *_menu; */
int bx, virtual void Paint(Graphics *g);
by,
bwidth,
bheight,
_item_size,
_index,
_top_index,
_visible_items,
_paint_count,
_vertical_gap,
_horizontal_gap;
jcolor_t _item_color;
float delta;
bool _input_locked,
_arrows_visible,
_loop,
_centered_interaction;
void SetMenu(Menu *menu); /**
* \brief
*
*/
virtual void InputChanged(KeyEvent *event);
public: /**
MenuComponent(int x, int y, int width, int visible_items); * \brief
virtual ~MenuComponent(); *
*/
virtual void RegisterInputListener(FrameInputListener *liste
ner);
void SetCenteredInteraction(bool b); /**
void SetLoop(bool loop); * \brief
jcolor_t GetItemColor(); *
void SetItemColor(jcolor_t color); */
void SetItemColor(int red, int green, int blue, int alpha); virtual void RemoveInputListener(FrameInputListener *listene
void SetCurrentIndex(int i); r);
void AddEmptyItem();
void AddItem(std::string text);
void AddItem(std::string text, std::string image);
void AddItem(std::string text, bool checked);
void AddMenuItem(MenuItem *item);
MenuItem * GetMenuItem(int index);
MenuItem * GetCurrentMenuItem();
int GetCurrentIndex();
int GetItemsSize();
void RemoveItem(int index);
void RemoveAll();
virtual bool ProcessEvent(KeyEvent *event); /**
virtual void Paint(Graphics *g); * \brief
*
*/
virtual std::vector<FrameInputListener *> & GetFrameInputLis
teners();
/**
* \brief
*
*/
virtual void ThemeChanged(ThemeEvent *event);
}; };
} }
#endif #endif
 End of changes. 48 change blocks. 
269 lines changed or deleted 211 lines changed or added


 jmenugroup.h   jmenugroup.h 
skipping to change at line 25 skipping to change at line 25
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_MENUGROUP_H #ifndef J_MENUGROUP_H
#define J_MENUGROUP_H #define J_MENUGROUP_H
#include "jeventobject.h" #include "jeventobject.h"
#include "jmenu.h" #include "jmenu.h"
#include "jmenulistener.h" #include "jselectlistener.h"
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>
#include <map> #include <map>
namespace jgui { namespace jgui {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class MenuGroup : public MenuListener{ class MenuGroup : public SelectListener{
private: private:
std::vector<MenuItem *> _items; std::vector<Item *> _items;
Menu *_menu; Menu *_menu;
protected: protected:
/** /**
* \brief * \brief
* *
*/ */
virtual void ItemSelected(MenuEvent *event); virtual void ItemSelected(SelectEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void ItemChanged(MenuEvent *event); virtual void ItemChanged(SelectEvent *event);
public: public:
/** /**
* \brief * \brief
* *
*/ */
MenuGroup(Menu *menu); MenuGroup(Menu *menu);
/** /**
* \brief * \brief
* *
*/ */
virtual ~MenuGroup(); virtual ~MenuGroup();
/** /**
* \brief * \brief
* *
*/ */
void Add(MenuItem *item); virtual void Add(Item *item);
/** /**
* \brief * \brief
* *
*/ */
void Remove(MenuItem *item); virtual void Remove(Item *item);
/** /**
* \brief * \brief
* *
*/ */
void Select(MenuItem *item); virtual void Select(Item *item);
/** /**
* \brief * \brief
* *
*/ */
MenuItem * GetSelected(); virtual Item * GetSelected();
}; };
} }
#endif #endif
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added


 jmouseevent.h   jmouseevent.h 
skipping to change at line 94 skipping to change at line 94
/** /**
* \brief * \brief
* *
*/ */
virtual ~MouseEvent(); virtual ~MouseEvent();
/** /**
* \brief * \brief
* *
*/ */
jmouse_event_t GetType(); virtual jmouse_event_t GetType();
/** /**
* \brief * \brief
* *
*/ */
int GetClickCount(); virtual int GetClickCount();
/** /**
* \brief * \brief
* *
*/ */
jmouse_button_t GetButton(); virtual jmouse_button_t GetButton();
/** /**
* \brief * \brief
* *
*/ */
int GetX(); virtual int GetX();
/** /**
* \brief * \brief
* *
*/ */
int GetY(); virtual int GetY();
}; };
} }
#endif #endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 jmulticastsocket.h   jmulticastsocket.h 
skipping to change at line 74 skipping to change at line 74
/** \brief Descriptor */ /** \brief Descriptor */
int _fds, _fdr; int _fds, _fdr;
#endif #endif
/** \brief Local socket */ /** \brief Local socket */
sockaddr_in _sock_s, _sock_r; sockaddr_in _sock_s, _sock_r;
/** \brief Input stream */ /** \brief Input stream */
SocketInputStream *_is; SocketInputStream *_is;
/** \brief Output stream */ /** \brief Output stream */
SocketOutputStream *_os; SocketOutputStream *_os;
/** \brief */ /** \brief */
long long _sent_bytes; int64_t _sent_bytes;
/** \brief */ /** \brief */
long long _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
std::vector<std::string> _groups; std::vector<std::string> _groups;
/** /**
* \brief Create a new socket * \brief Create a new socket
* *
*/ */
void CreateSocket(); void CreateSocket();
/** /**
skipping to change at line 205 skipping to change at line 205
/** /**
* \brief * \brief
* *
*/ */
int GetLocalPort(); int GetLocalPort();
/** /**
* \brief * \brief
* *
*/ */
virtual long long GetSentBytes(); virtual int64_t GetSentBytes();
/** /**
* \brief * \brief
* *
*/ */
virtual long long GetReceiveBytes(); virtual int64_t GetReceiveBytes();
/** /**
* \brief * \brief
* *
*/ */
void SetMulticastTTL(char ttl_); void SetMulticastTTL(char ttl_);
/** /**
* \brief * \brief
* *
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 jmutex.h   jmutex.h 
skipping to change at line 57 skipping to change at line 57
/** /**
* \brief Monitor. * \brief Monitor.
* *
* @author Jeff Ferr * @author Jeff Ferr
*/ */
class Mutex : public virtual jcommon::Object{ class Mutex : public virtual jcommon::Object{
friend class Condition; friend class Condition;
private: private:
#ifdef _WIN32 #ifdef _WIN32
HANDLE _mutex; HANDLE _mutex;
#else #else
/** \brief */ /** \brief */
pthread_mutex_t _mutex; pthread_mutex_t _mutex;
#endif #endif
/** \brief */ /** \brief */
jmutex_type_t _type; jmutex_type_t _type;
/** \brief */ /** \brief */
int _lock_count; int _lock_count;
public: public:
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
Mutex(jmutex_type_t = ERROR_CHECK_MUTEX, jmutex_protocol_t protocol_ Mutex(jmutex_type_t = ERROR_CHECK_MUTEX, jmutex_protocol_t p
= NONE_PROT_MUTEX, bool block_in_death = false); rotocol_ = NONE_PROT_MUTEX, bool block_in_death = false);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~Mutex(); virtual ~Mutex();
/** /**
* \brief Verify if a section is locked. * \brief Verify if a section is locked.
* *
*/ */
bool IsLocked(); bool IsLocked();
/** /**
* \brief Lock the critial section. * \brief Lock the critial section.
* *
*/ */
void Lock(); void Lock();
/** /**
* \brief Unlock the critical section. * \brief Unlock the critical section.
* *
*/ */
void Unlock(); void Unlock();
/** /**
* \brief Try lock the critical section. * \brief Try lock the critical section.
* *
*/ */
bool TryLock(); bool TryLock();
/** /**
* \brief * \brief
* *
*/ */
std::string what(); std::string what();
}; };
} }
 End of changes. 10 change blocks. 
40 lines changed or deleted 40 lines changed or added


 jnullgraphics.h   jnullgraphics.h 
skipping to change at line 419 skipping to change at line 419
/** /**
* \brief * \brief
* *
*/ */
virtual bool DrawImage(OffScreenImage *img, int sx, int sy, int sw, int sh, int x, int y, int w, int h, int alpha = 0xff); virtual bool DrawImage(OffScreenImage *img, int sx, int sy, int sw, int sh, int x, int y, int w, int h, int alpha = 0xff);
/** /**
* \brief * \brief
* *
*/ */
virtual void DrawString(std::string full_text, int x, int y, int width, int height, int align = 3); virtual void DrawString(std::string full_text, int x, int y, int width, int height, jhorizontal_align_t halign = JUSTIFY_HALIGN, jverti cal_align_t valign = CENTER_VALIGN);
/** /**
* \brief * \brief
* *
*/ */
virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf f000000); virtual uint32_t GetRGB(int xp, int yp, uint32_t pixel = 0xf f000000);
/** /**
* \brief * \brief
* *
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jobject.h   jobject.h 
skipping to change at line 26 skipping to change at line 26
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_OBJECT_H #ifndef J_OBJECT_H
#define J_OBJECT_H #define J_OBJECT_H
#include <string> #include <string>
#include <vector> #include <vector>
#include <stdint.h>
namespace jcommon { namespace jcommon {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Object{ class Object{
private: private:
skipping to change at line 66 skipping to change at line 68
/** /**
* \brief * \brief
* *
*/ */
void AddParent(std::string parent); void AddParent(std::string parent);
/** /**
* \brief * \brief
* *
*/ */
std::vector<std::string> & GetParents();
/**
* \brief
*
*/
void SetClassName(std::string name); void SetClassName(std::string name);
/** /**
* \brief * \brief
* *
*/ */
void SetNameSpace(std::string name); void SetNameSpace(std::string name);
/** /**
* \brief * \brief
skipping to change at line 114 skipping to change at line 122
/** /**
* \brief * \brief
* *
*/ */
virtual bool Equals(Object *); virtual bool Equals(Object *);
/** /**
* \brief * \brief
* *
*/ */
virtual void Copy(Object *); void Copy(Object *o);
/** /**
* \brief * \brief
* *
*/ */
virtual int Compare(Object *); virtual int Compare(Object *);
/** /**
* \brief * \brief
* *
*/ */
virtual unsigned long long Hash(); virtual uint64_t Hash();
/** /**
* \brief * \brief
* *
*/ */
virtual std::string what(); virtual std::string what();
}; };
} }
 End of changes. 4 change blocks. 
2 lines changed or deleted 10 lines changed or added


 joffscreenimage.h   joffscreenimage.h 
skipping to change at line 104 skipping to change at line 104
/** /**
* \brief * \brief
* *
*/ */
virtual ~OffScreenImage(); virtual ~OffScreenImage();
/** /**
* \brief * \brief
* *
*/ */
Graphics * GetGraphics(); virtual Graphics * GetGraphics();
/** /**
* \brief * \brief
* *
*/ */
OffScreenImage * Create(); virtual OffScreenImage * Create();
/** /**
* \brief * \brief
* *
*/ */
jsurface_pixelformat_t GetPixelFormat(); virtual jsurface_pixelformat_t GetPixelFormat();
/** /**
* \brief * \brief
* *
*/ */
int GetWidth(); virtual int GetWidth();
/** /**
* \brief * \brief
* *
*/ */
int GetHeight(); virtual int GetHeight();
/** /**
* \brief * \brief
* *
*/ */
int GetScaleWidth(); virtual int GetScaleWidth();
/** /**
* \brief * \brief
* *
*/ */
int GetScaleHeight(); virtual int GetScaleHeight();
/** /**
* \brief * \brief
* *
*/ */
void Release(); virtual void Release();
/** /**
* \brief * \brief
* *
*/ */
void Restore(); virtual void Restore();
}; };
} }
#endif #endif
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added


 joptions.h   joptions.h 
skipping to change at line 29 skipping to change at line 29
a************************************************************************* **/ a************************************************************************* **/
#ifndef J_OPTIONSPARSER_H #ifndef J_OPTIONSPARSER_H
#define J_OPTIONSPARSER_H #define J_OPTIONSPARSER_H
#include "jobject.h" #include "jobject.h"
#include <string> #include <string>
#include <map> #include <map>
#include <stdint.h> #include <stdint.h>
#include <stdio.h>
namespace jcommon { namespace jcommon {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Options : public virtual jcommon::Object{ class Options : public virtual jcommon::Object{
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 jprogramsysteminformationsection.h   jprogramsysteminformationsection.h 
skipping to change at line 71 skipping to change at line 71
/** /**
* \brief * \brief
* *
*/ */
bool HasFailed(); bool HasFailed();
/** /**
* \brief * \brief
* *
*/ */
void Clear();
/**
* \brief
*
*/
void Push(uint8_t *buffer, uint32_t size); void Push(uint8_t *buffer, uint32_t size);
/** /**
* \brief * \brief
* *
*/ */
void GetPayload(uint8_t *buffer, uint32_t *size); void GetPayload(uint8_t *buffer, uint32_t *size);
/** /**
* \brief * \brief
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added


 jprogressbar.h   jprogressbar.h 
skipping to change at line 68 skipping to change at line 68
_fixe_delta; _fixe_delta;
bool _label_visible, bool _label_visible,
_indeterminate, _indeterminate,
_running; _running;
public: public:
/** /**
* \brief * \brief
* *
*/ */
ProgressBar(int x = 0, int y = 0, int width = 0, int height = 0, jprogress_type_t type = LEFT_RIGHT_DIRECTION); ProgressBar(int x = 0, int y = 0, int width = DEFAULT_COMPON ENT_WIDTH, int height = DEFAULT_COMPONENT_HEIGHT, jprogress_type_t type = L EFT_RIGHT_DIRECTION);
/** /**
* \brief * \brief
* *
*/ */
virtual ~ProgressBar(); virtual ~ProgressBar();
/** /**
* \brief * \brief
* *
*/ */
double GetPosition(); virtual double GetPosition();
/** /**
* \brief * \brief
* *
*/ */
void SetPosition(double i); virtual void SetPosition(double i);
/** /**
* \brief * \brief
* *
*/ */
void SetStringPainted(bool b); virtual void SetStringPainted(bool b);
/** /**
* \brief * \brief
* *
*/ */
void SetIndeterminate(bool b); virtual void SetIndeterminate(bool b);
/** /**
* \brief * \brief
* *
*/ */
bool IsStringPainted(); virtual bool IsStringPainted();
/** /**
* \brief * \brief
* *
*/ */
void Release(); virtual void Release();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetVisible(bool b); virtual void SetVisible(bool b);
/** /**
* \brief * \brief
* *
*/ */
virtual void Run(); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Run();
}; };
} }
#endif #endif
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added


 jrawsocket.h   jrawsocket.h 
skipping to change at line 156 skipping to change at line 156
sockaddr_in _server_sock; sockaddr_in _server_sock;
/** \brief Local inetaddress. */ /** \brief Local inetaddress. */
InetAddress *_local; InetAddress *_local;
/** \brief Remote inetaddress. */ /** \brief Remote inetaddress. */
InetAddress *_address; InetAddress *_address;
/** \brief Input stream. */ /** \brief Input stream. */
SocketInputStream *_is; SocketInputStream *_is;
/** \brief Output stream. */ /** \brief Output stream. */
SocketOutputStream *_os; SocketOutputStream *_os;
/** \brief Bytes sent. */ /** \brief Bytes sent. */
long long _sent_bytes; int64_t _sent_bytes;
/** \brief Bytes received. */ /** \brief Bytes received. */
long long _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
int _timeout; int _timeout;
/** \brief */ /** \brief */
struct ifreq _ifr; struct ifreq _ifr;
/** \brief */ /** \brief */
int _index_device; int _index_device;
/** \brief */ /** \brief */
bool _promisc; bool _promisc;
/** \brief */ /** \brief */
std::string _device; std::string _device;
skipping to change at line 287 skipping to change at line 287
/** /**
* \brief Get port. * \brief Get port.
* *
*/ */
int GetPort(); int GetPort();
/** /**
* \brief Get sent bytes to destination. * \brief Get sent bytes to destination.
* *
*/ */
virtual long long GetSentBytes(); virtual int64_t GetSentBytes();
/** /**
* \brief Get received bytes from a source. * \brief Get received bytes from a source.
* *
*/ */
virtual long long GetReceiveBytes(); virtual int64_t GetReceiveBytes();
/** /**
* \brief Get a object SocketOption. * \brief Get a object SocketOption.
* *
*/ */
SocketOption * GetSocketOption(); SocketOption * GetSocketOption();
/** /**
* \brief * \brief
* *
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 jrtpsocket.h   jrtpsocket.h 
skipping to change at line 521 skipping to change at line 521
/** /**
* \brief * \brief
* *
*/ */
virtual SocketOutputStream * GetOutputStream(); virtual SocketOutputStream * GetOutputStream();
/** /**
* \brief * \brief
* *
*/ */
virtual long long GetSentBytes(); virtual int64_t GetSentBytes();
/** /**
* \brief * \brief
* *
*/ */
virtual long long GetReceiveBytes(); virtual int64_t GetReceiveBytes();
/** /**
* \brief * \brief
* *
*/ */
int ssrc_equal(const void *a, const void *b); int ssrc_equal(const void *a, const void *b);
/** /**
* \brief * \brief
* *
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 jscrollbar.h   jscrollbar.h 
skipping to change at line 53 skipping to change at line 53
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class ScrollBar : public jgui::Component{ class ScrollBar : public jgui::Component{
private: private:
std::vector<AdjustmentListener *> _adjust_listeners; std::vector<AdjustmentListener *> _adjust_listeners;
double _position, double _position,
_minimum_tick, _minimum_tick,
_maximum_tick, _maximum_tick,
_old_position; _old_position;
int _index, int _index,
_stone_size, _stone_size,
_arrows_size, _count_paint;
_count_paint;
bool _label_visible, bool _label_visible,
_indeterminate, _indeterminate,
_running; _running;
jscroll_orientation_t _type; jscroll_orientation_t _type;
public: public:
/** /**
* \brief * \brief
* *
*/ */
ScrollBar(int x = 0, int y = 0, int width = 0, int height = 0); ScrollBar(int x = 0, int y = 0, int width = DEFAULT_COMPONEN T_WIDTH, int height = DEFAULT_COMPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~ScrollBar(); virtual ~ScrollBar();
/** /**
* \brief * \brief
* *
*/ */
void SetOrientation(jscroll_orientation_t type); virtual void SetOrientation(jscroll_orientation_t type);
/**
* \brief
*
*/
jscroll_orientation_t GetOrientation();
/**
* \brief
*
*/
void SetStoneSize(int size);
/** /**
* \brief * \brief
* *
*/ */
void SetArrowsSize(int size); virtual jscroll_orientation_t GetOrientation();
/** /**
* \brief * \brief
* *
*/ */
int GetStoneSize(); virtual void SetStoneSize(int size);
/** /**
* \brief * \brief
* *
*/ */
int GetArrowsSize(); virtual int GetStoneSize();
/** /**
* \brief * \brief
* *
*/ */
double GetPosition(); virtual double GetPosition();
/** /**
* \brief * \brief
* *
*/ */
double GetMinorTickSpacing(); virtual double GetMinorTickSpacing();
/** /**
* \brief * \brief
* *
*/ */
double GetMajorTickSpacing(); virtual double GetMajorTickSpacing();
/** /**
* \brief * \brief
* *
*/ */
void SetPosition(double i); virtual void SetPosition(double i);
/** /**
* \brief * \brief
* *
*/ */
void SetMinorTickSpacing(double i); virtual void SetMinorTickSpacing(double i);
/** /**
* \brief * \brief
* *
*/ */
void SetMajorTickSpacing(double i); virtual void SetMajorTickSpacing(double i);
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void RegisterAdjustmentListener(AdjustmentListener * listener);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual void RemoveAdjustmentListener(AdjustmentListener *li stener);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(MouseEvent *event); virtual void DispatchAdjustmentEvent(AdjustmentEvent *event) ;
/** /**
* \brief * \brief
* *
*/ */
void RegisterAdjustmentListener(AdjustmentListener *listener ); virtual std::vector<AdjustmentListener *> & GetAdjustmentLis teners();
/** /**
* \brief * \brief
* *
*/ */
void RemoveAdjustmentListener(AdjustmentListener *listener); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(AdjustmentEvent *event); virtual bool ProcessEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<AdjustmentListener *> & GetAdjustmentListeners() ; virtual bool ProcessEvent(MouseEvent *event);
}; };
} }
#endif #endif
 End of changes. 21 change blocks. 
38 lines changed or deleted 25 lines changed or added


 jselectevent.h   jselectevent.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SELECTEVENT_H #ifndef J_SELECTEVENT_H
#define J_SELECTEVENT_H #define J_SELECTEVENT_H
#include "jeventobject.h" #include "jeventobject.h"
#include "jitemcomponent.h"
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>
#include <map> #include <map>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
skipping to change at line 58 skipping to change at line 59
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SelectEvent : public jcommon::EventObject{ class SelectEvent : public jcommon::EventObject{
private: private:
std::string _text; jgui::Item *_item;
int _index;
jselect_type_t _type; jselect_type_t _type;
int _index;
public: public:
/** /**
* \brief * \brief
* *
*/ */
SelectEvent(void *source, std::string text, int index, jsele ct_type_t type); SelectEvent(void *source, jgui::Item *item, int index, jsele ct_type_t type);
/** /**
* \brief * \brief
* *
*/ */
virtual ~SelectEvent(); virtual ~SelectEvent();
/** /**
* \brief * \brief
* *
*/ */
std::string GetText(); virtual jgui::Item * GetItem();
/** /**
* \brief * \brief
* *
*/ */
int GetIndex(); virtual int GetIndex();
/** /**
* \brief * \brief
* *
*/ */
jselect_type_t GetType(); virtual jselect_type_t GetType();
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
6 lines changed or deleted 7 lines changed or added


 jslider.h   jslider.h 
skipping to change at line 64 skipping to change at line 64
_indeterminate, _indeterminate,
_running, _running,
_inverted; _inverted;
jscroll_orientation_t _type; jscroll_orientation_t _type;
public: public:
/** /**
* \brief * \brief
* *
*/ */
Slider(int x = 0, int y = 0, int width = 0, int height = 0); Slider(int x = 0, int y = 0, int width = DEFAULT_COMPONENT_W IDTH, int height = DEFAULT_COMPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~Slider(); virtual ~Slider();
/** /**
* \brief * \brief
* *
*/ */
void SetStoneSize(int size); virtual void SetStoneSize(int size);
/** /**
* \brief * \brief
* *
*/ */
void SetOrientation(jscroll_orientation_t type); virtual void SetOrientation(jscroll_orientation_t type);
/** /**
* \brief * \brief
* *
*/ */
double GetPosition(); virtual double GetPosition();
/** /**
* \brief * \brief
* *
*/ */
void SetPosition(double i); virtual void SetPosition(double i);
/** /**
* \brief * \brief
* *
*/ */
void SetInverted(bool b); virtual void SetInverted(bool b);
/** /**
* \brief * \brief
* *
*/ */
double GetMinorTickSpacing(); virtual double GetMinorTickSpacing();
/** /**
* \brief * \brief
* *
*/ */
double GetMajorTickSpacing(); virtual double GetMajorTickSpacing();
/** /**
* \brief * \brief
* *
*/ */
void SetMinorTickSpacing(double i); virtual void SetMinorTickSpacing(double i);
/** /**
* \brief * \brief
* *
*/ */
void SetMajorTickSpacing(double i); virtual void SetMajorTickSpacing(double i);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual bool ProcessEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
skipping to change at line 148 skipping to change at line 148
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
void RegisterAdjustmentListener(AdjustmentListener *listener ); virtual void RegisterAdjustmentListener(AdjustmentListener * listener);
/** /**
* \brief * \brief
* *
*/ */
void RemoveAdjustmentListener(AdjustmentListener *listener); virtual void RemoveAdjustmentListener(AdjustmentListener *li stener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(AdjustmentEvent *event); virtual void DispatchAdjustmentEvent(AdjustmentEvent *event) ;
/** /**
* \brief * \brief
* *
*/ */
std::vector<AdjustmentListener *> & GetAdjustmentListeners() ; virtual std::vector<AdjustmentListener *> & GetAdjustmentLis teners();
}; };
} }
#endif #endif
 End of changes. 14 change blocks. 
14 lines changed or deleted 14 lines changed or added


 jsocket.h   jsocket.h 
skipping to change at line 76 skipping to change at line 76
SocketInputStream *_is; SocketInputStream *_is;
/** \brief */ /** \brief */
SocketOutputStream *_os; SocketOutputStream *_os;
/** \brief */ /** \brief */
sockaddr_in _lsock; sockaddr_in _lsock;
/** \brief */ /** \brief */
sockaddr_in _server_sock; sockaddr_in _server_sock;
/** \brief */ /** \brief */
InetAddress *_address; InetAddress *_address;
/** \brief Bytes sent. */ /** \brief Bytes sent. */
long long _sent_bytes; int64_t _sent_bytes;
/** \brief Bytes received. */ /** \brief Bytes received. */
long long _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
int _timeout; int _timeout;
/** /**
* \brief Create a new socket. * \brief Create a new socket.
* *
*/ */
void CreateSocket(); void CreateSocket();
/** /**
skipping to change at line 217 skipping to change at line 217
/** /**
* \brief Get the port. * \brief Get the port.
* *
*/ */
int GetPort(); int GetPort();
/** /**
* \brief Get the bytes sent to a destination. * \brief Get the bytes sent to a destination.
* *
*/ */
virtual long long GetSentBytes(); virtual int64_t GetSentBytes();
/** /**
* \brief Get de bytes received from a source. * \brief Get de bytes received from a source.
* *
*/ */
virtual long long GetReceiveBytes(); virtual int64_t GetReceiveBytes();
/** /**
* \brief Get the socket options. * \brief Get the socket options.
* *
*/ */
SocketOption * GetSocketOption(); SocketOption * GetSocketOption();
/** /**
* \brief * \brief
* *
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 jsocketinputstream.h   jsocketinputstream.h 
skipping to change at line 50 skipping to change at line 50
/** /**
* \brief SocketInputStream. * \brief SocketInputStream.
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class SocketInputStream : public jio::InputStream{ class SocketInputStream : public jio::InputStream{
private: private:
#ifdef _WIN32 #ifdef _WIN32
SOCKET _fd; /** \brief */
SOCKET _fd;
#else #else
int _fd; /** \brief */
int _fd;
#endif #endif
/** \brief */ /** \brief */
char *_buffer; char *_buffer;
/** \brief */ /** \brief */
int _buffer_length; int _buffer_length;
/** \brief */ /** \brief */
int _current_index; int _current_index;
/** \brief */ /** \brief */
int _end_index; int _end_index;
/** \brief */ /** \brief */
long long _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
bool _stream; bool _stream;
/** \brief */ /** \brief */
sockaddr_in _server_sock; sockaddr_in _server_sock;
/** \brief */ /** \brief */
bool *_is_closed; bool *_is_closed;
/** \brief */ /** \brief */
Connection *_connection; Connection *_connection;
public: public:
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
SocketInputStream(Connection *conn_, bool *is_closed_, int size_ = SocketInputStream(Connection *conn_, bool *is_closed
65535); _, int size_ = 65535);
/** /**
* \brief Construtor. * \brief Construtor.
* *
*/ */
SocketInputStream(Connection *conn_, bool *is_closed_, sockaddr_in SocketInputStream(Connection *conn_, bool *is_closed
server_sock_, int size_ = 65535); _, sockaddr_in server_sock_, int size_ = 65535);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~SocketInputStream(); virtual ~SocketInputStream();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual bool IsEmpty(); virtual bool IsEmpty();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual long long Available(); virtual int64_t Available();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual long long GetSize(); virtual int64_t GetSize();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual long long GetPosition(); virtual int64_t GetPosition();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual void Skip(long long skip); virtual void Skip(int64_t skip);
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual void Reset(); virtual void Reset();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual void Close(); virtual void Close();
/** /**
* \brief * \brief
* *
* \return the number of bytes received, or 0 if the peer ha * \return the number of bytes received, or 0 if the
s shutdown. peer has shutdown.
* *
* \exception SocketException an error occurred. * \exception SocketException an error occurred.
* *
*/ */
virtual int Read(); virtual int Read();
/** /**
* \brief * \brief
* *
* \return the number of bytes received, or 0 if the peer ha * \return the number of bytes received, or 0 if the
s shutdown. peer has shutdown.
* *
* \exception SocketException an error occurred. * \exception SocketException an error occurred.
* *
*/ */
virtual long long Read(char *data_, long long data_length_); virtual int64_t Read(char *data_, int64_t data_lengt
h_);
/** /**
* \brief * \brief
* *
*/ */
long long GetReceiveBytes(); int64_t GetReceiveBytes();
}; };
} }
#endif #endif
 End of changes. 16 change blocks. 
98 lines changed or deleted 101 lines changed or added


 jsocketoption.h   jsocketoption.h 
skipping to change at line 195 skipping to change at line 195
void SetRoute(bool opt_); void SetRoute(bool opt_);
/** /**
* \brief Set or get the broadcast flag. When enabled, datagram soc kets receive packets * \brief Set or get the broadcast flag. When enabled, datagram soc kets receive packets
* sent to a broadcast address and they are allowed to send p ackets to a broadcast * sent to a broadcast address and they are allowed to send p ackets to a broadcast
* address. This option has no effect on stream-oriented sockets. * address. This option has no effect on stream-oriented sockets.
* *
*/ */
void SetBroadcast(bool opt_); void SetBroadcast(bool opt_);
/**
* \brief
*
*/
void SetNoDelay(bool b_);
/** /**
* \brief Sets or gets the maximum socket send buffer in bytes * \brief Sets or gets the maximum socket send buffer in bytes
* *
*/ */
void SetSendMaximumBuffer(int length_); void SetSendMaximumBuffer(int length_);
/** /**
* \brief Sets or gets the maximum socket receive buffer in bytes. * \brief Sets or gets the maximum socket receive buffer in bytes.
* *
*/ */
skipping to change at line 272 skipping to change at line 278
* \brief Header is included ? * \brief Header is included ?
* *
*/ */
void SetHeaderInclude(bool opt_); void SetHeaderInclude(bool opt_);
/** /**
* \brief Return the receive timestamp of the last packet passed to the user. * \brief Return the receive timestamp of the last packet passed to the user.
* This is useful for accurate round trip time measurements. * This is useful for accurate round trip time measurements.
* *
*/ */
long long GetTimeStamp(); int64_t GetTimeStamp();
/** /**
* \brief Get MTU. * \brief Get MTU.
* *
*/ */
int GetMaximunTransferUnit(); int GetMaximunTransferUnit();
/** /**
* \brief Change the O_ASYNC flag to enable or disable asynchronous IO mode of the socket. * \brief Change the O_ASYNC flag to enable or disable asynchronous IO mode of the socket.
* Asynchronous IO mode means that the SIGIO signal or the signal s et with F_SETSIG is raised * Asynchronous IO mode means that the SIGIO signal or the signal s et with F_SETSIG is raised
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added


 jsocketoutputstream.h   jsocketoutputstream.h 
skipping to change at line 61 skipping to change at line 61
#else #else
int _fd; int _fd;
#endif #endif
/** \brief */ /** \brief */
char *_buffer; char *_buffer;
/** \brief */ /** \brief */
int _buffer_length; int _buffer_length;
/** \brief */ /** \brief */
int _current_index; int _current_index;
/** \brief */ /** \brief */
long long _sent_bytes; int64_t _sent_bytes;
/** \brief */ /** \brief */
bool _stream; bool _stream;
/** \brief */ /** \brief */
sockaddr_in _server_sock; sockaddr_in _server_sock;
/** \brief */ /** \brief */
bool *_is_closed; bool *_is_closed;
/** \brief */ /** \brief */
Connection *_connection; Connection *_connection;
public: public:
skipping to change at line 100 skipping to change at line 100
/** /**
* \brief * \brief
* *
*/ */
virtual bool IsEmpty(); virtual bool IsEmpty();
/** /**
* \brief * \brief
* *
*/ */
virtual long long Available(); virtual int64_t Available();
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual long long GetSize(); virtual int64_t GetSize();
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual void Seek(long long index); virtual void Seek(int64_t index);
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual void Close(); virtual void Close();
/** /**
* \brief * \brief
* *
*/ */
virtual int Write(int c_); virtual int Write(int c_);
/** /**
* \brief * \brief
* *
*/ */
long long Write(const char *data_, long long data_length_); int64_t Write(const char *data_, int64_t data_length_);
/** /**
* \brief * \brief
* *
*/ */
virtual int GetAvailable(); virtual int GetAvailable();
/** /**
* \brief * \brief
* *
*/ */
long long GetSentBytes(); int64_t GetSentBytes();
/** /**
* \brief * \brief
* *
*/ */
virtual long long Flush(); virtual int64_t Flush();
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
7 lines changed or deleted 7 lines changed or added


 jspin.h   jspin.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_SPIN_H #ifndef J_SPIN_H
#define J_SPIN_H #define J_SPIN_H
#include "jselectlistener.h" #include "jselectlistener.h"
#include "jcomponent.h" #include "jitemcomponent.h"
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>
#include <map> #include <map>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
skipping to change at line 53 skipping to change at line 53
enum jspin_type_t { enum jspin_type_t {
HORIZONTAL_SPIN, HORIZONTAL_SPIN,
VERTICAL_SPIN VERTICAL_SPIN
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Spin : public Component{ class Spin : public jgui::ItemComponent{
private: private:
std::vector<SelectListener *> _select_listeners; std::vector<SelectListener *> _select_listeners;
std::vector<std::string> _list;
int _index,
_arrows_size;
bool _loop;
jspin_type_t _type; jspin_type_t _type;
private:
void NextItem();
void PreviousItem();
public: public:
/** /**
* \brief * \brief
* *
*/ */
Spin(int x = 0, int y = 0, int width = 0, int height = 0); Spin(int x = 0, int y = 0, int width = DEFAULT_COMPONENT_WID TH, int height = DEFAULT_COMPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~Spin(); virtual ~Spin();
/** /**
* \brief * \brief
* *
*/ */
void SetArrowsSize(int size); virtual void SetType(jspin_type_t type);
/**
* \brief
*
*/
int GetArrowsSize();
/**
* \brief
*
*/
void SetType(jspin_type_t type);
/**
* \brief
*
*/
jspin_type_t GetType();
/**
* \brief
*
*/
void SetLoop(bool b);
/**
* \brief
*
*/
void SetIndex(int i);
/** /**
* \brief * \brief
* *
*/ */
void Add(std::string text); virtual jspin_type_t GetType();
/** /**
* \brief * \brief
* *
*/ */
void Remove(int index); virtual void AddEmptyItem();
/** /**
* \brief * \brief
* *
*/ */
void RemoveAll(); virtual void AddTextItem(std::string text);
/** /**
* \brief * \brief
* *
*/ */
std::string GetValue(); virtual void AddImageItem(std::string text, std::string imag e);
/** /**
* \brief * \brief
* *
*/ */
int GetIndex(); virtual void AddCheckedItem(std::string text, bool checked);
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(MouseEvent *event); virtual bool ProcessEvent(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual bool ProcessEvent(KeyEvent *event);
/**
* \brief
*
*/
void RegisterSelectListener(SelectListener *listener);
/**
* \brief
*
*/
void RemoveSelectListener(SelectListener *listener);
/**
* \brief
*
*/
void DispatchEvent(SelectEvent *event);
/**
* \brief
*
*/
std::vector<SelectListener *> & GetSelectListeners();
}; };
} }
#endif #endif
 End of changes. 12 change blocks. 
67 lines changed or deleted 13 lines changed or added


 jsslsocket.h   jsslsocket.h 
skipping to change at line 101 skipping to change at line 101
SSLSocketInputStream *_is; SSLSocketInputStream *_is;
/** \brief */ /** \brief */
SSLSocketOutputStream *_os; SSLSocketOutputStream *_os;
/** \brief */ /** \brief */
sockaddr_in _lsock; sockaddr_in _lsock;
/** \brief */ /** \brief */
sockaddr_in _server_sock; sockaddr_in _server_sock;
/** \brief */ /** \brief */
InetAddress *_address; InetAddress *_address;
/** \brief Bytes sent. */ /** \brief Bytes sent. */
long long _sent_bytes; int64_t _sent_bytes;
/** \brief Bytes received. */ /** \brief Bytes received. */
long long _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
int _timeout; int _timeout;
/** /**
* \brief Create a new socket. * \brief Create a new socket.
* *
*/ */
void CreateSocket(); void CreateSocket();
/** /**
skipping to change at line 278 skipping to change at line 278
/** /**
* \brief Get the port. * \brief Get the port.
* *
*/ */
int GetPort(); int GetPort();
/** /**
* \brief Get the bytes sent to a destination. * \brief Get the bytes sent to a destination.
* *
*/ */
virtual long long GetSentBytes(); virtual int64_t GetSentBytes();
/** /**
* \brief Get de bytes received from a source. * \brief Get de bytes received from a source.
* *
*/ */
virtual long long GetReceiveBytes(); virtual int64_t GetReceiveBytes();
/** /**
* \brief Get the socket options. * \brief Get the socket options.
* *
*/ */
SocketOption * GetSocketOption(); SocketOption * GetSocketOption();
/** /**
* Cert files (if not set, a temporary RSA session cert will be created if needed) * Cert files (if not set, a temporary RSA session cert will be created if needed)
* *
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 jsslsocketinputstream.h   jsslsocketinputstream.h 
skipping to change at line 67 skipping to change at line 67
#endif #endif
/** \brief */ /** \brief */
char *_buffer; char *_buffer;
/** \brief */ /** \brief */
int _buffer_length; int _buffer_length;
/** \brief */ /** \brief */
int _current_index; int _current_index;
/** \brief */ /** \brief */
int _end_index; int _end_index;
/** \brief */ /** \brief */
long long _receive_bytes; int64_t _receive_bytes;
/** \brief */ /** \brief */
bool _stream; bool _stream;
/** \brief */ /** \brief */
bool *_is_closed; bool *_is_closed;
/** \brief */ /** \brief */
Connection *_connection; Connection *_connection;
/** \brief */ /** \brief */
SSL *_ssl; SSL *_ssl;
public: public:
skipping to change at line 100 skipping to change at line 100
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual bool IsEmpty(); virtual bool IsEmpty();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual long long Available(); virtual int64_t Available();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual long long GetSize(); virtual int64_t GetSize();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual long long GetPosition(); virtual int64_t GetPosition();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual void Skip(long long skip); virtual void Skip(int64_t skip);
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
*/ */
virtual void Reset(); virtual void Reset();
/** /**
* \brief jio::InputStream * \brief jio::InputStream
* *
skipping to change at line 150 skipping to change at line 150
virtual int Read(); virtual int Read();
/** /**
* \brief * \brief
* *
* \return the number of bytes received, or 0 if the peer ha s shutdown. * \return the number of bytes received, or 0 if the peer ha s shutdown.
* *
* \exception SocketException an error occurred. * \exception SocketException an error occurred.
* *
*/ */
virtual long long Read(char *data_, long long data_length_); virtual int64_t Read(char *data_, int64_t data_length_);
/** /**
* \brief * \brief
* *
*/ */
long long GetReceiveBytes(); int64_t GetReceiveBytes();
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
7 lines changed or deleted 7 lines changed or added


 jsslsocketoutputstream.h   jsslsocketoutputstream.h 
skipping to change at line 65 skipping to change at line 65
#else #else
int _fd; int _fd;
#endif #endif
/** \brief */ /** \brief */
char *_buffer; char *_buffer;
/** \brief */ /** \brief */
int _buffer_length; int _buffer_length;
/** \brief */ /** \brief */
int _current_index; int _current_index;
/** \brief */ /** \brief */
long long _sent_bytes; int64_t _sent_bytes;
/** \brief */ /** \brief */
bool _stream; bool _stream;
/** \brief */ /** \brief */
bool *_is_closed; bool *_is_closed;
/** \brief */ /** \brief */
Connection *_connection; Connection *_connection;
/** \brief */ /** \brief */
SSL *_ssl; SSL *_ssl;
public: public:
skipping to change at line 98 skipping to change at line 98
/** /**
* \brief * \brief
* *
*/ */
virtual bool IsEmpty(); virtual bool IsEmpty();
/** /**
* \brief * \brief
* *
*/ */
virtual long long Available(); virtual int64_t Available();
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual long long GetSize(); virtual int64_t GetSize();
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual void Seek(long long index); virtual void Seek(int64_t index);
/** /**
* \brief jio::OutputStream * \brief jio::OutputStream
* *
*/ */
virtual void Close(); virtual void Close();
/** /**
* \brief * \brief
* *
*/ */
virtual int Write(int c_); virtual int Write(int c_);
/** /**
* \brief * \brief
* *
*/ */
long long Write(const char *data_, long long data_length_); int64_t Write(const char *data_, int64_t data_length_);
/** /**
* \brief * \brief
* *
*/ */
virtual int GetAvailable(); virtual int GetAvailable();
/** /**
* \brief * \brief
* *
*/ */
long long GetSentBytes(); int64_t GetSentBytes();
/** /**
* \brief * \brief
* *
*/ */
virtual long long Flush(); virtual int64_t Flush();
}; };
} }
#endif #endif
 End of changes. 7 change blocks. 
7 lines changed or deleted 7 lines changed or added


 jtable.h   jtable.h 
skipping to change at line 46 skipping to change at line 46
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Cell : public virtual jcommon::Object{ class Cell : public virtual jcommon::Object{
private: private:
Table *_table; Table *_table;
std::string _value; std::string _value;
jalign_t _align;
int _bgcell_red, int _bgcell_red,
_bgcell_green, _bgcell_green,
_bgcell_blue, _bgcell_blue,
_bgcell_alpha; _bgcell_alpha;
int _fgcell_red, int _fgcell_red,
_fgcell_green, _fgcell_green,
_fgcell_blue, _fgcell_blue,
_fgcell_alpha; _fgcell_alpha;
jhorizontal_align_t _halign;
jvertical_align_t _valign;
Cell(Table *table); Cell(Table *table);
public: public:
virtual ~Cell(); virtual ~Cell();
void SetAlign(jalign_t align); /**
jalign_t GetAlign(); * \brief
*
*/
virtual void SetValue(std::string value);
void SetValue(std::string value); /**
std::string GetValue(); * \brief
*
*/
virtual std::string GetValue();
void SetCellBackgroundColor(jcolor_t color); /**
void SetCellForegroundColor(jcolor_t color); * \brief
void SetCellBackgroundColor(int r, int g, int b, int a); *
void SetCellForegroundColor(int r, int g, int b, int a); */
virtual void SetCellBackgroundColor(jcolor_t color);
/**
* \brief
*
*/
virtual void SetCellForegroundColor(jcolor_t color);
/**
* \brief
*
*/
virtual void SetCellBackgroundColor(int r, int g, int b, int
a);
/**
* \brief
*
*/
virtual void SetCellForegroundColor(int r, int g, int b, int
a);
/**
* \brief
*
*/
virtual void SetHorizontalAlign(jhorizontal_align_t align);
/**
* \brief
*
*/
virtual jhorizontal_align_t GetHorizontalAlign();
/**
* \brief
*
*/
virtual void SetVerticalAlign(jvertical_align_t align);
/**
* \brief
*
*/
virtual jvertical_align_t GetVerticalAlign();
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Table : public Component, public virtual jcommon::Object{ class Table : public Component, public virtual jcommon::Object{
skipping to change at line 116 skipping to change at line 166
/** /**
* \brief * \brief
* *
*/ */
virtual ~Table(); virtual ~Table();
/** /**
* \brief * \brief
* *
*/ */
void SetLoop(bool loop); virtual void SetLoop(bool loop);
/**
* \brief
*
*/
int GetNumberOfColumns();
/**
* \brief
*
*/
int GetNumberOfRows();
/**
* \brief
*
*/
void SetNumberOfColumns(int size);
/** /**
* \brief * \brief
* *
*/ */
void SetNumberOfRows(int size); virtual int GetNumberOfColumns();
/** /**
* \brief * \brief
* *
*/ */
void InsertColumn(std::string text, int index = -1); virtual int GetNumberOfRows();
/** /**
* \brief * \brief
* *
*/ */
void InsertRow(std::string text, int index = -1); virtual void SetNumberOfColumns(int size);
/** /**
* \brief * \brief
* *
*/ */
void RemoveColumn(int index); virtual void SetNumberOfRows(int size);
/** /**
* \brief * \brief
* *
*/ */
void RemoveRow(int index); virtual void InsertColumn(std::string text, int index = -1);
/** /**
* \brief * \brief
* *
*/ */
void SetHeaderValue(std::string text, int index); virtual void InsertRow(std::string text, int index = -1);
/** /**
* \brief * \brief
* *
*/ */
std::string GetHeaderValue(int index); virtual void RemoveColumn(int index);
/** /**
* \brief * \brief
* *
*/ */
void SetHeaderVisible(bool visible); virtual void RemoveRow(int index);
/** /**
* \brief * \brief
* *
*/ */
bool IsHeaderVisible(); virtual void SetHeaderValue(std::string text, int index);
/** /**
* \brief * \brief
* *
*/ */
int GetCurrentColumn(); virtual std::string GetHeaderValue(int index);
/** /**
* \brief * \brief
* *
*/ */
int GetCurrentRow(); virtual void SetHeaderVisible(bool visible);
/** /**
* \brief * \brief
* *
*/ */
Cell * GetCurrentCell(); virtual bool IsHeaderVisible();
/** /**
* \brief * \brief
* *
*/ */
void SetCurrentCell(int row, int column); virtual int GetCurrentColumn();
/** /**
* \brief * \brief
* *
*/ */
Cell * GetCell(int row, int column); virtual int GetCurrentRow();
/** /**
* \brief * \brief
* *
*/ */
void SetCell(Cell *cell, int row, int column); virtual Cell * GetCurrentCell();
/** /**
* \brief * \brief
* *
*/ */
jcolor_t GetItemColor(); virtual void SetCurrentCell(int row, int column);
/** /**
* \brief * \brief
* *
*/ */
void SetItemColor(jcolor_t color); virtual Cell * GetCell(int row, int column);
/** /**
* \brief * \brief
* *
*/ */
void SetItemColor(int red, int green, int blue, int alpha); virtual void SetCell(Cell *cell, int row, int column);
/** /**
* \brief * \brief
* *
*/ */
void SetGridColor(jcolor_t color); virtual void SetGridColor(jcolor_t color);
/** /**
* \brief * \brief
* *
*/ */
void SetGridColor(int r, int g, int b, int a); virtual void SetGridColor(int r, int g, int b, int a);
/** /**
* \brief * \brief
* *
*/ */
void SetColumnSize(int index, int size); virtual void SetColumnSize(int index, int size);
/** /**
* \brief * \brief
* *
*/ */
int GetColumnSize(int index); virtual int GetColumnSize(int index);
/** /**
* \brief * \brief
* *
*/ */
void SetRowSize(int index, int size); virtual void SetRowSize(int index, int size);
/** /**
* \brief * \brief
* *
*/ */
int GetRowSize(int index); virtual int GetRowSize(int index);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual bool ProcessEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
 End of changes. 30 change blocks. 
52 lines changed or deleted 86 lines changed or added


 jtextarea.h   jtextarea.h 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_TEXTAREA_H #ifndef J_TEXTAREA_H
#define J_TEXTAREA_H #define J_TEXTAREA_H
#include "jruntimeexception.h" #include "jtextcomponent.h"
#include "jstringtokenizer.h"
#include "jstringutils.h"
#include "jtextlistener.h"
#include "jcomponent.h"
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <map> #include <map>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
#include <time.h> #include <time.h>
namespace jgui { namespace jgui {
/** /**
* \brief * \brief
* *
*/
enum jcursor_type_t {
NONE_CURSOR,
UNDERSCORE_CURSOR,
STICK_CURSOR,
BLOCK_CURSOR
};
/**
* \brief
*
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class TextArea : public Component{ class TextArea : public jgui::TextComponent{
private: private:
std::vector<TextListener *> _text_listeners; int _line_op; // 0-nop, 1-inc, 2-dec
std::string _text, bool _is_wrap;
_selected_text;
int _max_text_length,
_position,
_line_op, // 0-nop, 1-inc, 2-dec
_begin_index,
_end_index;
bool _is_wrap,
_cursor_visible,
_is_editable;
char _echo_char;
jcursor_type_t _cursor_type;
/** /**
* \brief * \brief
* *
*/ */
void IncLine(); void IncLine();
/** /**
* \brief * \brief
* *
*/ */
void DecLine(); void DecLine();
/** /**
* \brief * \brief
* *
*/ */
void GetLines(std::vector<std::string> *texts); void GetLines(std::vector<std::string> &texts);
public: public:
/** /**
* \brief * \brief
* *
*/ */
TextArea(int x = 0, int y = 0, int width = 0, int height = 0 , int max_text = -1); TextArea(int x = 0, int y = 0, int width = 0, int height = 0 );
/** /**
* \brief * \brief
* *
*/ */
virtual ~TextArea(); virtual ~TextArea();
/** /**
* \brief * \brief
* *
*/ */
void SetEchoChar(char echo_char); virtual void ScrollUp();
/**
* \brief
*
*/
char GetEchoChar();
/**
* \brief
*
*/
bool EchoCharIsSet();
/**
* \brief
*
*/
void SetEditable(bool b);
/**
* \brief
*
*/
bool IsEditable();
/**
* \brief
*
*/
void SetCaretPosition(int pos);
/**
* \brief
*
*/
int GetCaretPosition();
/**
* \brief
*
*/
void SetCaretVisible(bool visible);
/**
* \brief
*
*/
void SetCaretType(jcursor_type_t t);
/**
* \brief
*
*/
jcursor_type_t GetCaretType();
/**
* \brief
*
*/
void Clear();
/**
* \brief
*
*/
void Backspace();
/**
* \brief
*
*/
void Delete();
/**
* \brief
*
*/
void SetMaxTextSize(int max);
/**
* \brief
*
*/
void IncCaretPosition(int size);
/**
* \brief
*
*/
void DecCaretPosition();
/**
* \brief
*
*/
void Insert(std::string text, int pos = -1);
/**
* \brief
*
*/
void Append(std::string text);
/**
* \brief
*
*/
void SetText(std::string text);
/**
* \brief
*
*/
std::string GetText();
/**
* \brief
*
*/
bool SetSelectedText(int begin, int end);
/**
* \brief
*
*/
std::string GetSelectedText();
/**
* \brief
*
*/
void ScrollUp();
/** /**
* \brief * \brief
* *
*/ */
void ScrollDown(); virtual void ScrollDown();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetWrap(bool b); virtual void SetWrap(bool b);
/** /**
* \brief * \brief
* *
skipping to change at line 276 skipping to change at line 117
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual bool ProcessEvent(KeyEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(MouseEvent *event); virtual bool ProcessEvent(MouseEvent *event);
/**
* \brief
*
*/
void RegisterTextListener(TextListener *listener);
/**
* \brief
*
*/
void RemoveTextListener(TextListener *listener);
/**
* \brief
*
*/
void DispatchEvent(TextEvent *event);
/**
* \brief
*
*/
std::vector<TextListener *> & GetTextListeners();
}; };
} }
#endif #endif
 End of changes. 9 change blocks. 
191 lines changed or deleted 8 lines changed or added


 jtextevent.h   jtextevent.h 
skipping to change at line 65 skipping to change at line 65
/** /**
* \brief * \brief
* *
*/ */
virtual ~TextEvent(); virtual ~TextEvent();
/** /**
* \brief * \brief
* *
*/ */
std::string GetText(); virtual std::string GetText();
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 jtextfield.h   jtextfield.h 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_TEXTFIELD_H #ifndef J_TEXTFIELD_H
#define J_TEXTFIELD_H #define J_TEXTFIELD_H
#include "jruntimeexception.h" #include "jtextcomponent.h"
#include "jstringtokenizer.h"
#include "jstringutils.h"
#include "jtextarea.h"
#include "jtextlistener.h"
#include "jcomponent.h"
#include <iostream> #include <iostream>
#include <cstdlib> #include <cstdlib>
#include <map> #include <map>
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
#include <time.h> #include <time.h>
namespace jgui { namespace jgui {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class TextField : public Component{ class TextField : public jgui::TextComponent{
private:
std::vector<TextListener *> _text_listeners;
std::string _text,
_selected_text;
int _max_text_length,
_position,
_begin_index,
_end_index;
jalign_t _align;
bool _cursor_visible,
_is_editable;
char _echo_char;
jcursor_type_t _cursor;
public: public:
/** /**
* \brief * \brief
* *
*/ */
TextField(int x = 0, int y = 0, int width = 0, int height = 0, int max_text = -1); TextField(int x = 0, int y = 0, int width = DEFAULT_COMPONEN T_WIDTH, int height = DEFAULT_COMPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~TextField(); virtual ~TextField();
/** /**
* \brief * \brief
* *
*/ */
void SetEchoChar(char echo_char);
/**
* \brief
*
*/
char GetEchoChar();
/**
* \brief
*
*/
bool EchoCharIsSet();
/**
* \brief
*
*/
void SetEditable(bool b);
/**
* \brief
*
*/
bool IsEditable();
/**
* \brief
*
*/
void SetAlign(jalign_t align);
/**
* \brief
*
*/
jalign_t GetAlign();
/**
* \brief
*
*/
void SetCaretType(jcursor_type_t t);
/**
* \brief
*
*/
void SetCaretVisible(bool visible);
/**
* \brief
*
*/
void Clear();
/**
* \brief
*
*/
void Backspace();
/**
* \brief
*
*/
void Delete();
/**
* \brief
*
*/
void SetMaxTextSize(int max);
/**
* \brief
*
*/
void IncCaretPosition(int size);
/**
* \brief
*
*/
void DecCaretPosition();
/**
* \brief
*
*/
void SetText(std::string text);
/**
* \brief
*
*/
void Append(std::string text);
/**
* \brief
*
*/
void Insert(std::string text, int pos = -1);
/**
* \brief
*
*/
std::string GetText();
/**
* \brief
*
*/
bool SetSelectedText(int begin, int end);
/**
* \brief
*
*/
std::string GetSelectedText();
/**
* \brief
*
*/
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(MouseEvent *event); virtual bool ProcessEvent(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual bool ProcessEvent(KeyEvent *event);
/**
* \brief
*
*/
void RegisterTextListener(TextListener *listener);
/**
* \brief
*
*/
void RemoveTextListener(TextListener *listener);
/**
* \brief
*
*/
void DispatchEvent(TextEvent *event);
/**
* \brief
*
*/
std::vector<TextListener *> & GetTextListeners();
}; };
} }
#endif #endif
 End of changes. 5 change blocks. 
173 lines changed or deleted 3 lines changed or added


 jtheme.h   jtheme.h 
skipping to change at line 36 skipping to change at line 36
#include <string> #include <string>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
namespace jgui { namespace jgui {
class Component; class Component;
class Window; class Window;
class ItemComponent;
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Theme : public jcommon::Object{ class Theme : public jcommon::Object{
friend class ThemeManager; friend class ThemeManager;
friend class Component; friend class Component;
friend class Window; friend class Window;
friend class ItemComponent;
friend class Frame; friend class Frame;
private: private:
Font *_window_font,
*_component_font;
jinsets_t _insets;
jcolor_t _window_bgcolor, jcolor_t _window_bgcolor,
_window_fgcolor, _window_fgcolor,
_window_border_color, _window_border_color,
_component_bgcolor, _component_bgcolor,
_component_fgcolor, _component_fgcolor,
_component_border_color, _component_border_color,
_component_border_focus_col or, _component_border_focus_col or,
_component_focus_bgcolor, _component_focus_bgcolor,
_component_focus_fgcolor; _component_focus_fgcolor,
int _gradient_level, _item_color,
_window_border_size, _item_focus_color,
_component_border_size; _item_selected_color,
jinsets_t _insets; _item_selected_fgcolor,
Font *_window_font, _item_fgcolor,
*_component_font; _item_focus_fgcolor;
jcomponent_border_t _component_border, jcomponent_border_t _component_border,
_wi
ndow_border; _window_border;
int _window_border_size,
_component_border_size;
public:
/** /**
* \brief * \brief
* *
*/ */
virtual void Update(Component *parent); Theme();
public:
/** /**
* \brief * \brief
* *
*/ */
Theme(); virtual ~Theme();
/** /**
* \brief * \brief
* *
*/ */
virtual ~Theme(); virtual void Update(Component *parent);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetWindowBackgroundColor(int red, int green, in t blue, int alpha); virtual void SetWindowBackgroundColor(int red, int green, in t blue, int alpha);
/** /**
* \brief * \brief
* *
skipping to change at line 145 skipping to change at line 152
/** /**
* \brief * \brief
* *
*/ */
virtual void SetComponentForegroundFocusColor(int red, int g reen, int blue, int alpha); virtual void SetComponentForegroundFocusColor(int red, int g reen, int blue, int alpha);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetItemColor(int red, int green, int blue, int
alpha);
/**
* \brief
*
*/
virtual void SetItemFocusColor(int red, int green, int blue,
int alpha);
/**
* \brief
*
*/
virtual void SetSelectedItemColor(int red, int green, int bl
ue, int alpha);
/**
* \brief
*
*/
virtual void SetSelectedItemForegroundColor(int red, int gre
en, int blue, int alpha);
/**
* \brief
*
*/
virtual void SetItemForegroundColor(int red, int green, int
blue, int alpha);
/**
* \brief
*
*/
virtual void SetItemForegroundFocusColor(int red, int green,
int blue, int alpha);
/**
* \brief
*
*/
virtual void SetComponentBorder(jcomponent_border_t border); virtual void SetComponentBorder(jcomponent_border_t border);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetWindowBorder(jcomponent_border_t border); virtual void SetWindowBorder(jcomponent_border_t border);
/** /**
* \brief * \brief
skipping to change at line 187 skipping to change at line 230
/** /**
* \brief * \brief
* *
*/ */
virtual void SetComponentFont(Font *font); virtual void SetComponentFont(Font *font);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetGradientLevel(int level); virtual jcolor_t GetWindowBackgroundColor();
/**
* \brief
*
*/
virtual jcolor_t GetWindowForegroundColor();
/**
* \brief
*
*/
virtual jcolor_t GetWindowBorderColor();
/**
* \brief
*
*/
virtual jcolor_t GetComponentBackgroundColor();
/**
* \brief
*
*/
virtual jcolor_t GetComponentForegroundColor();
/**
* \brief
*
*/
virtual jcolor_t GetComponentBorderColor();
/**
* \brief
*
*/
virtual jcolor_t GetComponentBorderFocusColor();
/**
* \brief
*
*/
virtual jcolor_t GetComponentBackgroundFocusColor();
/**
* \brief
*
*/
virtual jcolor_t GetComponentForegroundFocusColor();
/**
* \brief
*
*/
virtual jcolor_t GetItemColor();
/**
* \brief
*
*/
virtual jcolor_t GetItemFocusColor();
/**
* \brief
*
*/
virtual jcolor_t GetSelectedItemColor();
/**
* \brief
*
*/
virtual jcolor_t GetSelectedItemForegroundColor();
/**
* \brief
*
*/
virtual jcolor_t GetItemForegroundColor();
/**
* \brief
*
*/
virtual jcolor_t GetItemForegroundFocusColor();
/**
* \brief
*
*/
virtual jcomponent_border_t GetComponentBorder();
/**
* \brief
*
*/
virtual jcomponent_border_t GetWindowBorder();
/**
* \brief
*
*/
virtual jinsets_t GetWindowInsets();
/**
* \brief
*
*/
virtual int GetWindowBorderSize();
/**
* \brief
*
*/
virtual int GetComponentBorderSize();
/**
* \brief
*
*/
virtual Font * GetWindowFont();
/**
* \brief
*
*/
virtual Font * GetComponentFont();
}; };
} }
#endif #endif
 End of changes. 12 change blocks. 
14 lines changed or deleted 189 lines changed or added


 jthememanager.h   jthememanager.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_THEMEMANAGER_H #ifndef J_THEMEMANAGER_H
#define J_THEMEMANAGER_H #define J_THEMEMANAGER_H
#include "jtheme.h" #include "jtheme.h"
#include "jthemelistener.h"
#include <string> #include <string>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
namespace jgui { namespace jgui {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class ThemeManager : public jcommon::Object{ class ThemeManager : public jcommon::Object{
private: private:
static ThemeManager *_instance; static ThemeManager *_instance;
std::vector<ThemeListener *> _theme_listeners;
Theme *_theme, Theme *_theme,
*_default_theme; *_default_theme;
/** /**
* \brief * \brief
* *
*/ */
ThemeManager(); ThemeManager();
public: public:
skipping to change at line 69 skipping to change at line 71
/** /**
* \brief * \brief
* *
*/ */
static ThemeManager * GetInstance(); static ThemeManager * GetInstance();
/** /**
* \brief * \brief
* *
*/ */
Theme * GetDefaultTheme(); virtual Theme * GetDefaultTheme();
/** /**
* \brief * \brief
* *
*/ */
void SetTheme(Theme *theme); virtual void SetTheme(Theme *theme);
/** /**
* \brief * \brief
* *
*/ */
Theme * GetTheme(); virtual Theme * GetTheme();
/** /**
* \brief * \brief
* *
*/ */
void Update(); virtual void RegisterThemeListener(ThemeListener *listener);
/**
* \brief
*
*/
virtual void RemoveThemeListener(ThemeListener *listener);
/**
* \brief
*
*/
virtual void DispatchThemeEvent(ThemeEvent *event);
/**
* \brief
*
*/
virtual std::vector<ThemeListener *> & GetThemeListeners();
}; };
} }
#endif #endif
 End of changes. 6 change blocks. 
4 lines changed or deleted 24 lines changed or added


 jthread.h   jthread.h 
skipping to change at line 168 skipping to change at line 168
*/ */
Thread(jthread_type_t type = JOINABLE_THREAD); Thread(jthread_type_t type = JOINABLE_THREAD);
/** /**
* \brief Destrutor virtual. * \brief Destrutor virtual.
* *
*/ */
virtual ~Thread(); virtual ~Thread();
/** /**
* \brief
*
*/
static void Sleep(long long time_);
/**
* \brief
*
*/
static void USleep(long long time_);
/**
* \brief Get thread identifier * \brief Get thread identifier
* *
*/ */
int GetId(); int GetID();
/** /**
* \brief * \brief
* *
*/ */
void KillAllThreads(); void KillAllThreads();
/** /**
* \brief Init the thread. * \brief Init the thread.
* *
skipping to change at line 210 skipping to change at line 222
*/ */
void Resume(int key = 0); void Resume(int key = 0);
/** /**
* \brief Return true if thread is started, false if not. * \brief Return true if thread is started, false if not.
* *
*/ */
bool IsRunning(int key = 0); bool IsRunning(int key = 0);
/** /**
* \brief
*
*/
static void Sleep(long long time_);
/**
* \brief
*
*/
static void USleep(long long time_);
/**
* \bried * \bried
* *
*/ */
void SetPolicy(jthread_policy_t policy, jthread_priority_t p riority); void SetPolicy(jthread_policy_t policy, jthread_priority_t p riority);
/** /**
* \bried * \bried
* *
*/ */
void GetPolicy(jthread_policy_t *policy, jthread_priority_t *priority); void GetPolicy(jthread_policy_t *policy, jthread_priority_t *priority);
 End of changes. 3 change blocks. 
13 lines changed or deleted 13 lines changed or added


 jtooglebutton.h   jtooglebutton.h 
skipping to change at line 52 skipping to change at line 52
class ToogleButton : public ImageButton{ class ToogleButton : public ImageButton{
private: private:
bool _is_pressed; bool _is_pressed;
public: public:
/** /**
* \brief * \brief
* *
*/ */
ToogleButton(std::string label, int x = 0, int y = 0, int wi dth = 0, int height = 0); ToogleButton(std::string label, int x = 0, int y = 0, int wi dth = DEFAULT_COMPONENT_WIDTH, int height = DEFAULT_COMPONENT_HEIGHT);
/** /**
* \brief * \brief
* *
*/ */
ToogleButton(std::string image, std::string label, int x = 0 , int y = 0, int width = 0, int height = 0); ToogleButton(std::string label, std::string image, int x = 0 , int y = 0, int width = 0, int height = 0);
/** /**
* \brief * \brief
* *
*/ */
virtual ~ToogleButton(); virtual ~ToogleButton();
/** /**
* \brief * \brief
* *
*/ */
void SetButtonPressed(bool b); virtual void SetButtonPressed(bool b);
/** /**
* \brief * \brief
* *
*/ */
bool IsPressed(); virtual bool IsPressed();
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added


 jtree.h   jtree.h 
skipping to change at line 24 skipping to change at line 24
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_TREE_H #ifndef J_TREE_H
#define J_TREE_H #define J_TREE_H
#include "jmenu.h" #include "jmenu.h"
#include "jitemcomponent.h"
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
namespace jgui { namespace jgui {
class TreeItem;
class TreeComponent;
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Tree : public jgui::Component{ class Tree : public jgui::ItemComponent{
friend class TreeComponent;
private: private:
jthread::Mutex _tree_mutex; jthread::Mutex _tree_mutex;
std::vector<Tree *> _trees; jgui::OffScreenImage *_icon_plus,
std::vector<MenuListener *> _tree_listeners; *_icon_minus;
TreeItem *_current_item; std::string _title;
TreeComponent *_list; int _top_index,
int _visible_items; _item_size,
jmenu_align_t _menu_align; _centered_interaction;
jcolor_t _item_color;
public:
/**
* \brief
*
*/
Tree(int x = 0, int y = 0, int width = 0, int visible_items
= 3);
/**
* \brief
*
*/
virtual ~Tree();
/**
* \brief
*
*/
void SetTreeAlign(jmenu_align_t align);
/**
* \brief
*
*/
int GetItemsSize();
/**
* \brief
*
*/
int GetVisibleItems();
/**
* \brief
*
*/
void SetLoop(bool loop);
/**
* \brief
*
*/
jcolor_t GetItemColor();
/**
* \brief
*
*/
void SetItemColor(jcolor_t color);
/**
* \brief
*
*/
void SetItemColor(int red, int green, int blue, int alpha);
/**
* \brief
*
*/
void SetCurrentIndex(int i);
/**
* \brief
*
*/
void AddTreeItem(TreeItem *item);
/**
* \brief
*
*/
TreeItem * GetCurrentItem();
/**
* \brief
*
*/
int GetCurrentIndex();
/**
* \brief
*
*/
void RemoveItem(int index);
/**
* \brief
*
*/
void RemoveAll();
/**
* \brief
*
*/
void RegisterMenuListener(MenuListener *listener);
/**
* \brief
*
*/
void RemoveMenuListener(MenuListener *listener);
/**
* \brief
*
*/
void DispatchEvent(MenuEvent *event);
/**
* \brief
*
*/
std::vector<MenuListener *> & GetMenuListeners();
/**
* \brief
*
*/
virtual bool ProcessEvent(KeyEvent *event);
};
/**
* \brief
*
* \author Jeff Ferr
*/
class TreeItem{
friend class TreeComponent;
friend class ComboTreeComponent;
private:
std::vector<TreeItem *> _childs;
Tree *_parent;
OffScreenImage *_prefetch;
std::string _value,
_image;
jmenuitem_type_t _type;
bool _is_checked,
_is_visible,
_enabled;
public:
TreeItem()
{
_enabled = true;
_parent = NULL;
_prefetch = NULL;
_is_checked = false;
_is_visible = true;
_type = EMPTY_MENU_ITEM;
}
TreeItem(std::string value)
{
_enabled = true;
_parent = NULL;
_prefetch = NULL;
_value = value;
_is_checked = false;
_is_visible = true;
_type = TEXT_MENU_ITEM;
}
TreeItem(std::string value, std::string image)
{
_enabled = true;
_parent = NULL;
_prefetch = NULL;
_image = image;
_value = value;
_is_checked = false;
_is_visible = true;
_type = IMAGE_MENU_ITEM;
}
TreeItem(std::string value, bool checked)
{
_enabled = true;
_parent = NULL;
_prefetch = NULL;
_value = value;
_is_checked = checked;
_is_visible = true;
_type = CHECK_MENU_ITEM;
}
~TreeItem()
{
}
Tree * GetParent()
{
return _parent;
}
std::vector<TreeItem *> & GetSubItems()
{
return _childs;
}
void SetEnabled(bool b)
{
_enabled = b;
}
bool GetEnabled()
{
return _enabled;
}
void SetVisible(bool b)
{
_is_visible = b;
}
bool IsVisible()
{
return _is_visible;
}
void SetSelected(bool b)
{
_is_checked = b;
}
void SetParent(Tree *parent)
{
_parent = parent;
}
void AddSubItem(TreeItem *item)
{
if (_type == jgui::CHECK_MENU_ITEM) {
throw MenuException("Item cannot accept chil
ds");
}
_childs.push_back(item);
}
std::string GetValue()
{
return _value;
}
std::string GetImage()
{
return _image;
}
jmenuitem_type_t GetType()
{
return _type;
}
bool IsSelected()
{
return _is_checked;
}
};
/**
* \brief
*
* \author Jeff Ferr
*/
class TreeComponent : public Component{
friend class Tree;
private: private:
std::vector<TreeItem *>_items;
OffScreenImage *prefetch;
Tree *_tree;
int bx,
by,
bwidth,
bheight,
_item_size,
_index,
_visible_items,
_paint_count,
_vertical_gap,
_horizontal_gap;
jcolor_t _item_color;
float delta;
bool _input_locked,
_arrows_visible,
_loop;
/**
* \brief
*
*/
void SetTree(Tree *tree);
public:
/**
* \brief
*
*/
TreeComponent(int x, int y, int width, int visible_items);
/**
* \brief
*
*/
virtual ~TreeComponent();
/**
* \brief
*
*/
void SetGap(int hgap, int vgap);
/**
* \brief
*
*/
void SetLoop(bool loop);
/**
* \brief
*
*/
jcolor_t GetItemColor();
/** /**
* \brief * \brief
* *
*/ */
void SetItemColor(jcolor_t color); virtual void MousePressed(MouseEvent *event);
/**
* \brief
*
*/
void SetItemColor(int red, int green, int blue, int alpha);
/**
* \brief
*
*/
void SetCurrentIndex(int i);
/** /**
* \brief * \brief
* *
*/ */
void AddEmptyItem(); virtual void MouseReleased(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void AddItem(std::string text); virtual void MouseClicked(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void AddItem(std::string text, std::string image); virtual void MouseMoved(MouseEvent *event);
/** /**
* \brief * \brief
* *
*/ */
void AddItem(std::string text, bool checked); virtual void MouseWheel(MouseEvent *event);
public:
/** /**
* \brief * \brief
* *
*/ */
void AddTreeItem(TreeItem *item); Tree(int x = 0, int y = 0, int width = 0, int visible_items = 3);
/** /**
* \brief * \brief
* *
*/ */
TreeItem * GetTreeItem(int index); virtual ~Tree();
/** /**
* \brief * \brief
* *
*/ */
TreeItem * GetCurrentTreeItem(); virtual void SetTitle(std::string title);
/** /**
* \brief * \brief
* *
*/ */
int GetCurrentIndex(); virtual void SetCenteredInteraction(bool b);
/** /*
* \brief * \brief
* *
*/ */
int GetItemsSize(); virtual Item * GetCurrentItem();
/** /**
* \brief * \brief
* *
*/ */
void RemoveItem(int index); virtual int GetCurrentIndex();
/** /**
* \brief * \brief
* *
*/ */
void RemoveAll(); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual bool ProcessEvent(KeyEvent *event); virtual bool ProcessEvent(KeyEvent *event);
/**
* \brief
*
*/
virtual void Paint(Graphics *g);
}; };
} }
#endif #endif
 End of changes. 20 change blocks. 
375 lines changed or deleted 22 lines changed or added


 jurl.h   jurl.h 
skipping to change at line 32 skipping to change at line 32
#include "jobject.h" #include "jobject.h"
#include <map> #include <map>
#include <string> #include <string>
#include <bitset> #include <bitset>
#include <stdint.h> #include <stdint.h>
#include <cstdlib> #include <cstdlib>
#include <string.h> #include <string.h>
#include <stdio.h>
namespace jcommon { namespace jcommon {
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class URL : public virtual jcommon::Object{ class URL : public virtual jcommon::Object{
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 jwatch.h   jwatch.h 
skipping to change at line 64 skipping to change at line 64
*/ */
class Watch : public jgui::Component, public jthread::Thread{ class Watch : public jgui::Component, public jthread::Thread{
private: private:
int _hour, int _hour,
_minute, _minute,
_second; _second;
bool _running, bool _running,
_paused; _paused;
jwatch_type_t _type; jwatch_type_t _type;
jhorizontal_align_t _halign;
jvertical_align_t _valign;
public: public:
/** /**
* \brief * \brief
* *
*/ */
Watch(int x = 0, int y = 0, int width = 0, int height = 0, j watch_type_t type = ANALOGIC_WATCH); Watch(jwatch_type_t type = ANALOGIC_WATCH, int x = 0, int y = 0, int width = DEFAULT_COMPONENT_WIDTH, int height = DEFAULT_COMPONENT_HE IGHT);
/** /**
* \brief * \brief
* *
*/ */
virtual ~Watch(); virtual ~Watch();
/** /**
* \brief * \brief
* *
*/ */
virtual void SetVisible(bool b); virtual void SetVisible(bool b);
/** /**
* \brief * \brief
* *
*/ */
void SetSeconds(int i); virtual void SetSeconds(int i);
/** /**
* \brief * \brief
* *
*/ */
void SetMinutes(int i); virtual void SetMinutes(int i);
/** /**
* \brief * \brief
* *
*/ */
void SetHours(int i); virtual void SetHours(int i);
/** /**
* \brief * \brief
* *
*/ */
void Pause(); virtual void Pause();
/** /**
* \brief * \brief
* *
*/ */
void Reset(); virtual void Reset();
/**
* \brief
*
*/
virtual void SetHorizontalAlign(jhorizontal_align_t align);
/**
* \brief
*
*/
virtual jhorizontal_align_t GetHorizontalAlign();
/**
* \brief
*
*/
virtual void SetVerticalAlign(jvertical_align_t align);
/**
* \brief
*
*/
virtual jvertical_align_t GetVerticalAlign();
/** /**
* \brief * \brief
* *
*/ */
virtual void Paint(Graphics *g); virtual void Paint(Graphics *g);
/** /**
* \brief * \brief
* *
*/ */
virtual void Run(); virtual void Run();
/** /**
* \brief * \brief
* *
*/ */
void Release(); virtual void Release();
}; };
} }
#endif #endif
 End of changes. 8 change blocks. 
7 lines changed or deleted 33 lines changed or added


 jwindow.h   jwindow.h 
skipping to change at line 26 skipping to change at line 26
* along with this program; if not, write to the * * along with this program; if not, write to the *
* Free Software Foundation, Inc., * * Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
************************************************************************** */ ************************************************************************** */
#ifndef J_WINDOW_H #ifndef J_WINDOW_H
#define J_WINDOW_H #define J_WINDOW_H
#include "jcontainer.h" #include "jcontainer.h"
#include "jwindowlistener.h" #include "jwindowlistener.h"
#include "joffscreenimage.h" #include "joffscreenimage.h"
#include "jthemelistener.h"
#include "jmutex.h" #include "jmutex.h"
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
namespace jgui{ namespace jgui{
class Graphics; class Graphics;
class InputManager; class InputManager;
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class Window : public Container{ class Window : public jgui::Container, public jgui::ThemeListener{
friend class InputManager; friend class InputManager;
friend class WindowManager; friend class WindowManager;
protected: protected:
#ifdef DIRECTFB_UI #ifdef DIRECTFB_UI
IDirectFBWindow *window; IDirectFBWindow *window;
IDirectFBSurface *surface; IDirectFBSurface *surface;
#endif #endif
skipping to change at line 80 skipping to change at line 81
/** /**
* \brief * \brief
* *
*/ */
virtual ~Window(); virtual ~Window();
/** /**
* \brief * \brief
* *
*/ */
Graphics * GetGraphics(); virtual Graphics * GetGraphics();
/** /**
* \brief * \brief
* *
*/ */
void * GetNativeWindow(); virtual void * GetNativeWindow();
/**
* \brief
*
*/
virtual void SetWorkingScreenSize(int width, int height);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetOpacity(int i); virtual void SetOpacity(int i);
/** /**
* \brief * \brief
* *
skipping to change at line 146 skipping to change at line 153
/** /**
* \brief * \brief
* *
*/ */
virtual void SetBounds(int x1, int y1, int w1, int h1); virtual void SetBounds(int x1, int y1, int w1, int h1);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetPosition(int x1, int y1); virtual void SetLocation(int x1, int y1);
/** /**
* \brief * \brief
* *
*/ */
virtual void SetSize(int w, int h); virtual void SetSize(int w, int h);
/** /**
* \brief * \brief
* *
skipping to change at line 242 skipping to change at line 249
/** /**
* \brief * \brief
* *
*/ */
virtual void DumpScreen(std::string dir, std::string pre); virtual void DumpScreen(std::string dir, std::string pre);
/** /**
* \brief * \brief
* *
*/ */
void RegisterWindowListener(WindowListener *listener); virtual void RegisterWindowListener(WindowListener *listener );
/** /**
* \brief * \brief
* *
*/ */
void RemoveWindowListener(WindowListener *listener); virtual void RemoveWindowListener(WindowListener *listener);
/** /**
* \brief * \brief
* *
*/ */
void DispatchEvent(WindowEvent *event); virtual void DispatchWindowEvent(WindowEvent *event);
/** /**
* \brief * \brief
* *
*/ */
std::vector<WindowListener *> & GetWindowListeners(); virtual std::vector<WindowListener *> & GetWindowListeners() ;
/**
* \brief
*
*/
virtual void ThemeChanged(ThemeEvent *event);
}; };
} }
#endif #endif
 End of changes. 10 change blocks. 
8 lines changed or deleted 20 lines changed or added


 jwindowevent.h   jwindowevent.h 
skipping to change at line 47 skipping to change at line 47
/** /**
* \brief * \brief
* *
*/ */
enum jwindow_event_t { enum jwindow_event_t {
WINDOW_CLOSING_EVENT, WINDOW_CLOSING_EVENT,
WINDOW_CLOSED_EVENT, WINDOW_CLOSED_EVENT,
WINDOW_OPENED_EVENT, WINDOW_OPENED_EVENT,
WINDOW_RESIZED_EVENT, WINDOW_RESIZED_EVENT,
WINDOW_MOVED_EVENT WINDOW_MOVED_EVENT,
WINDOW_PAINTED_EVENT
}; };
/** /**
* \brief * \brief
* *
* \author Jeff Ferr * \author Jeff Ferr
*/ */
class WindowEvent : public jcommon::EventObject{ class WindowEvent : public jcommon::EventObject{
private: private:
skipping to change at line 77 skipping to change at line 78
/** /**
* \brief * \brief
* *
*/ */
virtual ~WindowEvent(); virtual ~WindowEvent();
/** /**
* \brief * \brief
* *
*/ */
jwindow_event_t GetType(); virtual jwindow_event_t GetType();
}; };
} }
#endif #endif
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added


 jwindowlistener.h   jwindowlistener.h 
skipping to change at line 90 skipping to change at line 90
* *
*/ */
virtual void WindowResized(WindowEvent *event); virtual void WindowResized(WindowEvent *event);
/** /**
* \brief * \brief
* *
*/ */
virtual void WindowMoved(WindowEvent *event); virtual void WindowMoved(WindowEvent *event);
/**
* \brief
*
*/
virtual void WindowPainted(WindowEvent *event);
}; };
} }
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added


 jwindowmanager.h   jwindowmanager.h 
skipping to change at line 67 skipping to change at line 67
/** /**
* \brief * \brief
* *
*/ */
static WindowManager * GetInstance(); static WindowManager * GetInstance();
/** /**
* \brief * \brief
* *
*/ */
std::vector<Window *> & GetWindows(); virtual std::vector<Window *> & GetWindows();
/** /**
* \brief * \brief
* *
*/ */
Window * GetWindowInFocus(); virtual Window * GetWindowInFocus();
/** /**
* \brief * \brief
* *
*/ */
void Add(Window *w); virtual void Add(Window *w);
/** /**
* \brief * \brief
* *
*/ */
void Remove(Window *w); virtual void Remove(Window *w);
/** /**
* \brief * \brief
* *
*/ */
void Restore(); virtual void Restore();
/** /**
* \brief * \brief
* *
*/ */
void Release(); virtual void Release();
/** /**
* \brief * \brief
* *
*/ */
void RaiseToTop(Window *c); virtual void RaiseToTop(Window *c);
/** /**
* \brief * \brief
* *
*/ */
void LowerToBottom(Window *c); virtual void LowerToBottom(Window *c);
/** /**
* \brief * \brief
* *
*/ */
void PutWindowATop(Window *c, Window *c1); virtual void PutWindowATop(Window *c, Window *c1);
/** /**
* \brief * \brief
* *
*/ */
void PutWindowBelow(Window *c, Window *c1); virtual void PutWindowBelow(Window *c, Window *c1);
}; };
} }
#endif /*GFXHANDLER_H_*/ #endif /*GFXHANDLER_H_*/
 End of changes. 10 change blocks. 
10 lines changed or deleted 10 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/