Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle

This commit is contained in:
DrSlony
2015-08-11 11:55:03 +02:00
parent effb46c3e1
commit 0e0cfb9b25
452 changed files with 133354 additions and 99460 deletions

View File

@@ -7,7 +7,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -29,32 +29,40 @@
/*
* Class handling the list of ThumbBrowserEntry objects and their position in it's allocated space
*/
class ThumbBrowserBase : public Gtk::VBox {
class ThumbBrowserBase : public Gtk::VBox
{
class Internal : public Gtk::DrawingArea {
Glib::RefPtr<Gdk::GC> gc_;
int ofsX, ofsY;
ThumbBrowserBase* parent;
bool dirty;
public:
Internal ();
void setParent (ThumbBrowserBase* p);
void on_realize();
bool on_expose_event(GdkEventExpose* event);
bool on_button_press_event (GdkEventButton* event);
bool on_button_release_event (GdkEventButton* event);
bool on_motion_notify_event (GdkEventMotion* event);
bool on_scroll_event (GdkEventScroll* event);
bool on_key_press_event (GdkEventKey* event);
bool on_query_tooltip (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip);
void setPosition (int x, int y);
class Internal : public Gtk::DrawingArea
{
void setDirty () { dirty = true; }
bool isDirty () { return dirty; }
Glib::RefPtr<Gdk::GC> gc_;
int ofsX, ofsY;
ThumbBrowserBase* parent;
bool dirty;
public:
Internal ();
void setParent (ThumbBrowserBase* p);
void on_realize();
bool on_expose_event(GdkEventExpose* event);
bool on_button_press_event (GdkEventButton* event);
bool on_button_release_event (GdkEventButton* event);
bool on_motion_notify_event (GdkEventMotion* event);
bool on_scroll_event (GdkEventScroll* event);
bool on_key_press_event (GdkEventKey* event);
bool on_query_tooltip (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip);
void setPosition (int x, int y);
void setDirty ()
{
dirty = true;
}
bool isDirty ()
{
return dirty;
}
};
public:
public:
enum eLocation {
THLOC_BATCHQUEUE,
@@ -62,15 +70,18 @@ class ThumbBrowserBase : public Gtk::VBox {
THLOC_EDITOR
} location;
protected:
virtual int getMaxThumbnailHeight() const { return options.maxThumbnailHeight; } // Differs between batch and file
virtual void saveThumbnailHeight (int height)=0;
virtual int getThumbnailHeight ()=0;
protected:
virtual int getMaxThumbnailHeight() const
{
return options.maxThumbnailHeight; // Differs between batch and file
}
virtual void saveThumbnailHeight (int height) = 0;
virtual int getThumbnailHeight () = 0;
Internal internal;
Gtk::HScrollbar hscroll;
Gtk::VScrollbar vscroll;
int inW, inH;
Inspector *inspector;
@@ -80,11 +91,17 @@ class ThumbBrowserBase : public Gtk::VBox {
void resizeThumbnailArea (int w, int h);
void internalAreaResized (Gtk::Allocation& req);
void buttonPressed (int x, int y, int button, GdkEventType type, int state, int clx, int cly, int clw, int clh);
public:
void setInspector(Inspector* inspector) { this->inspector = inspector; }
Inspector* getInspector() { return inspector; }
public:
void setInspector(Inspector* inspector)
{
this->inspector = inspector;
}
Inspector* getInspector()
{
return inspector;
}
void disableInspector();
void enableInspector();
enum Arrangement {TB_Horizontal, TB_Vertical};
@@ -98,11 +115,17 @@ class ThumbBrowserBase : public Gtk::VBox {
void selectFirst (bool enlarge);
void selectLast (bool enlarge);
virtual bool isInTabMode() { return false; }
virtual bool isInTabMode()
{
return false;
}
eLocation getLocation() { return location; }
eLocation getLocation()
{
return location;
}
protected:
protected:
int eventTime;
@@ -110,7 +133,7 @@ class ThumbBrowserBase : public Gtk::VBox {
std::vector<ThumbBrowserEntryBase*> fd;
std::vector<ThumbBrowserEntryBase*> selected;
ThumbBrowserEntryBase* lastClicked;
int previewHeight;
int numOfCols;
@@ -121,39 +144,57 @@ class ThumbBrowserBase : public Gtk::VBox {
void arrangeFiles ();
void zoomChanged (bool zoomIn);
public:
public:
ThumbBrowserBase ();
void zoomIn () { zoomChanged (true); }
void zoomOut () { zoomChanged (false); }
void zoomIn ()
{
zoomChanged (true);
}
void zoomOut ()
{
zoomChanged (false);
}
int getEffectiveHeight ();
const std::vector<ThumbBrowserEntryBase*>& getEntries () { return fd; }
const std::vector<ThumbBrowserEntryBase*>& getEntries ()
{
return fd;
}
void on_style_changed (const Glib::RefPtr<Gtk::Style>& style);
void redraw (); // arrange files and draw area
void refreshThumbImages (); // refresh thumbnail sizes, re-generate thumbnail images, arrange and draw
void refreshQuickThumbImages (); // refresh thumbnail sizes, re-generate thumbnail images, arrange and draw
void refreshEditedState (const std::set<Glib::ustring>& efiles);
void initEntry (ThumbBrowserEntryBase* entry);
void getScrollPosition (double& h, double& v);
void setScrollPosition (double h, double v);
void setArrangement (Arrangement a);
void enableTabMode(bool enable); // set both thumb sizes and arrangements
virtual bool checkFilter (ThumbBrowserEntryBase* entry) { return true; }
virtual bool checkFilter (ThumbBrowserEntryBase* entry)
{
return true;
}
virtual void rightClicked (ThumbBrowserEntryBase* entry) {}
virtual void doubleClicked (ThumbBrowserEntryBase* entry) {}
virtual bool keyPressed (GdkEventKey* event) {return true;}
virtual bool keyPressed (GdkEventKey* event)
{
return true;
}
virtual void selectionChanged () {}
virtual void redrawNeeded (ThumbBrowserEntryBase* entry);
virtual void thumbRearrangementNeeded () {}
Gtk::Widget* getDrawingArea () { return &internal; }
Gtk::Widget* getDrawingArea ()
{
return &internal;
}
};
#endif