Further reduction of include dependencies

This commit is contained in:
Ingo Weyrich 2019-11-02 17:29:26 +01:00
parent afeca7f5f9
commit b3b1008270
38 changed files with 75 additions and 129 deletions

View File

@ -89,6 +89,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}")
# Stop compilation on typos such as std:swap (missing colon will be detected as unused label):
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=unused-label")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=delete-incomplete")
# Special treatment for x87 and x86-32 SSE (see GitHub issue #4324)
include(FindX87Math)

View File

@ -79,7 +79,6 @@ set(NONCLISOURCEFILES
hsvequalizer.cc
iccprofilecreator.cc
icmpanel.cc
ilabel.cc
imagearea.cc
imageareapanel.cc
impulsedenoise.cc

View File

@ -22,6 +22,7 @@
#include <gtkmm.h>
#include "batchqueueentry.h"
#include "lwbutton.h"
#include "lwbuttonset.h"
#include "threadutils.h"
#include "thumbbrowserbase.h"

View File

@ -18,8 +18,10 @@
*/
#include "batchqueuebuttonset.h"
#include "lwbutton.h"
#include "multilangmgr.h"
#include "rtimage.h"
#include "rtsurface.h"
bool BatchQueueButtonSet::iconsLoaded = false;

View File

@ -21,9 +21,10 @@
#include <gtkmm.h>
#include "lwbuttonset.h"
#include "rtsurface.h"
class BatchQueueEntry;
class RTSurface;
class BatchQueueButtonSet : public LWButtonSet
{

View File

@ -16,6 +16,10 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#include "bayerpreprocess.h"
#include "bayerprocess.h"
#include "multilangmgr.h"
#include "batchtoolpanelcoord.h"
#include "options.h"

View File

@ -33,6 +33,7 @@
#include "editcallbacks.h"
#include "editbuffer.h"
#include "editwidgets.h"
#include "rtsurface.h"
#include "../rtengine/dcrop.h"
#include "../rtengine/procparams.h"

View File

@ -22,10 +22,6 @@
#include "../rtengine/coord.h"
#include <cairomm/cairomm.h>
#ifdef GUIVERSION
#include "rtsurface.h"
#endif
class EditDataProvider;
class EditSubscriber;

View File

@ -23,6 +23,7 @@
#include "../rtengine/imagesource.h"
#include "../rtengine/iccstore.h"
#include "batchqueue.h"
#include "soundman.h"
#include "rtimage.h"
#include "rtwindow.h"
@ -34,6 +35,7 @@
#include "placesbrowser.h"
#include "pathutils.h"
#include "thumbnail.h"
#include "toolpanelcoord.h"
using namespace rtengine::procparams;

View File

@ -31,7 +31,6 @@
#include "progressconnector.h"
#include "saveasdlg.h"
#include "thumbnaillistener.h"
#include "toolpanelcoord.h"
#include "../rtengine/noncopyable.h"
#include "../rtengine/rtengine.h"
@ -39,6 +38,7 @@
class EditorPanel;
class MyProgressBar;
class Thumbnail;
class ToolPanelCoordinator;
struct EditorPanelIdleHelper {
EditorPanel* epanel;

View File

@ -18,8 +18,10 @@
*/
#include "editwidgets.h"
#include "editbuffer.h"
#include "editcallbacks.h"
#include "rtsurface.h"
#include "../rtengine/rt_math.h"
RGBColor Geometry::getInnerLineColor ()

View File

@ -20,12 +20,14 @@
#ifdef GUIVERSION
#include "rtsurface.h"
#include <glibmm/ustring.h>
#include "editbuffer.h"
#include "editcoordsys.h"
#include "../rtengine/coord.h"
class ObjectMOBuffer;
class RTSurface;
/** @file
*

View File

@ -16,6 +16,7 @@
*/
#include "editwindow.h"
#include "../rtengine/procparams.h"
#include "options.h"
#include "preferences.h"
#include "cursormanager.h"

View File

@ -27,6 +27,7 @@
#include "exportpanel.h"
#include "extprog.h"
#include "filebrowserentry.h"
#include "lwbutton.h"
#include "partialpastedlg.h"
#include "pparamschangelistener.h"
#include "../rtengine/profilestore.h"

View File

@ -25,6 +25,7 @@
#include <glib/gstdio.h>
#include "../rtengine/rt_math.h"
#include "../rtengine/procparams.h"
#include "guiutils.h"
#include "options.h"

View File

@ -18,6 +18,8 @@
*/
#include "filepanel.h"
#include "batchtoolpanelcoord.h"
#include "editorpanel.h"
#include "rtwindow.h"
#include "inspector.h"
#include "placesbrowser.h"

View File

@ -20,7 +20,6 @@
#include <gtkmm.h>
#include "batchtoolpanelcoord.h"
#include "dirbrowser.h"
#include "exportpanel.h"
#include "filecatalog.h"
@ -34,6 +33,7 @@
#include "../rtengine/noncopyable.h"
class BatchToolPanelCoordinator;
class RTWindow;
class FilePanel final :

View File

@ -20,6 +20,8 @@
#include "rtimage.h"
#include "multilangmgr.h"
#include "lwbutton.h"
#include "rtsurface.h"
bool FileThumbnailButtonSet::iconsLoaded = false;

View File

@ -24,9 +24,9 @@
#include "filebrowserentry.h"
#include "lwbuttonset.h"
#include "rtsurface.h"
class FileBrowserEntry;
class RTSurface;
class FileThumbnailButtonSet :
public LWButtonSet

View File

@ -17,18 +17,20 @@
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#include <iostream>
#include <iomanip>
#include <sigc++/slot.h>
#include "iccprofilecreator.h"
#include "../rtengine/iccstore.h"
#include "multilangmgr.h"
#include "cachemanager.h"
#include "addsetids.h"
#include "../rtengine/color.h"
#include "options.h"
#include "pathutils.h"
#include "rtimage.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include "rtwindow.h"
const char* sTRCPreset[] = {"BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9", "Lab_g3.0s9.03296"}; //gamma free

View File

@ -19,10 +19,13 @@
*/
#pragma once
#include <lcms2.h>
#include <gtkmm.h>
#include "adjuster.h"
#include <vector>
#include "rtwindow.h"
class RTWindow;
class ICCProfileCreator : public Gtk::Dialog, public AdjusterListener
{

View File

@ -1,66 +0,0 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#include "ilabel.h"
ILabel::ILabel (const Glib::ustring &lab) : label(lab) {}
void ILabel::on_realize()
{
Gtk::DrawingArea::on_realize();
add_events(Gdk::EXPOSURE_MASK);
Glib::RefPtr<Pango::Layout> fn = create_pango_layout(label);
fn->set_markup (label);
int labw, labh;
fn->get_pixel_size (labw, labh);
set_size_request (2 + labw, 2 + labh);
}
bool ILabel::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
{
Glib::RefPtr<Gtk::StyleContext> style = get_style_context ();
Gtk::StateFlags state = get_state_flags();
Gdk::RGBA c = style->get_background_color(state);
cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue());
cr->rectangle (0, 0, get_width (), get_height());
cr->fill ();
Glib::RefPtr<Pango::Layout> fn = create_pango_layout (label);
fn->set_markup (label);
cr->move_to(1., 1.);
fn->add_to_cairo_context(cr);
c = style->get_color (state);
cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue());
cr->fill();
return true;
}
void ILabel::on_style_updated ()
{
Glib::RefPtr<Pango::Layout> fn = create_pango_layout(label);
fn->set_markup (label);
int labw, labh;
fn->get_pixel_size (labw, labh);
set_size_request (2 + labw, 2 + labh);
}

View File

@ -1,34 +0,0 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <gtkmm.h>
class ILabel :
public Gtk::DrawingArea
{
Glib::ustring label;
public:
explicit ILabel (const Glib::ustring &lab);
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) override;
void on_realize() override;
void on_style_updated () override;
};

View File

@ -25,6 +25,7 @@
#include "../rtengine/refreshmap.h"
#include "../rtengine/procparams.h"
#include "options.h"
#include "rtscalable.h"
ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), fullImageWidth(0), fullImageHeight(0)
{

View File

@ -18,6 +18,7 @@
*/
#include "lwbutton.h"
#include "guiutils.h"
#include "rtsurface.h"
LWButton::LWButton (Cairo::RefPtr<RTSurface> i, int aCode, void* aData, Alignment ha, Alignment va, Glib::ustring* tooltip)
: xpos(0), ypos(0), halign(ha), valign(va), icon(i), bgr(0.0), bgg(0.0), bgb(0.0), fgr(0.0), fgg(0.0), fgb(0.0), state(Normal), listener(nullptr), actionCode(aCode), actionData(aData), toolTip(tooltip)

View File

@ -19,9 +19,7 @@
#pragma once
#include <gtkmm.h>
#include "rtsurface.h"
class LWButton;
class LWButtonListener

View File

@ -17,6 +17,8 @@
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#include "lwbuttonset.h"
#include "lwbutton.h"
#include "rtscalable.h"
LWButtonSet::LWButtonSet () : aw(0), ah(0), ax(-1), ay(-1)
{

View File

@ -19,9 +19,10 @@
#pragma once
#include <gtkmm.h>
#include "lwbutton.h"
#include <vector>
class LWButton;
class LWButtonListener;
class LWButtonSet
{

View File

@ -34,12 +34,16 @@
#include <locale.h>
#include <lensfun.h>
#include "cachemanager.h"
#include "editorpanel.h"
#include "filecatalog.h"
#include "filepanel.h"
#include "options.h"
#include "soundman.h"
#include "rtimage.h"
#include "version.h"
#include "extprog.h"
#include "../rtengine/dynamicprofile.h"
#include "../rtengine/procparams.h"
#ifndef WIN32
#include <glibmm/fileutils.h>

View File

@ -25,8 +25,10 @@
#include "../rtengine/dfmanager.h"
#include "../rtengine/ffmanager.h"
#include "../rtengine/iccstore.h"
#include "../rtengine/procparams.h"
#include <sstream>
#include "rtimage.h"
#include "rtwindow.h"
#ifdef _OPENMP
#include <omp.h>
#endif

View File

@ -25,7 +25,10 @@
#include "adjuster.h"
#include "dynamicprofilepanel.h"
#include "options.h"
#include "rtwindow.h"
#include "../rtengine/profilestore.h"
class RTWindow;
class Splash;
class Preferences :
public Gtk::Dialog,

View File

@ -21,6 +21,7 @@
#include "imagearea.h"
#include "cursormanager.h"
#include "options.h"
#include "rtscalable.h"
#include "../rtengine/procparams.h"

View File

@ -23,7 +23,7 @@
#include <sigc++/sigc++.h>
#include "guiutils.h"
#include "multilangmgr.h"
#include "../rtengine/rtengine.h"
#undef THREAD_PRIORITY_NORMAL

View File

@ -17,6 +17,7 @@
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/
#include "renamedlg.h"
#include "cacheimagedata.h"
#include "multilangmgr.h"
#include "rtimage.h"

View File

@ -20,11 +20,12 @@
#include <gtkmm.h>
#include "cacheimagedata.h"
#include "guiutils.h"
#define RESPONSE_ALL 100
class CacheImageData;
class RenameDialog :
public Gtk::Dialog
{

View File

@ -23,10 +23,15 @@
#include "preferences.h"
#include "iccprofilecreator.h"
#include "cursormanager.h"
#include "editwindow.h"
#include "rtimage.h"
#include "thumbnail.h"
#include "whitebalance.h"
#include "../rtengine/settings.h"
#include "batchqueuepanel.h"
#include "editorpanel.h"
#include "filepanel.h"
#include "filmsimulation.h"
float fontScale = 1.f;
Glib::RefPtr<Gtk::CssProvider> cssForced;
@ -1163,3 +1168,8 @@ void RTWindow::createSetmEditor()
mainNB->append_page (*epanel, *editorLabelGrid);
}
bool RTWindow::isSingleTabMode() const
{
return !options.tabbedUI && ! (options.multiDisplayMode > 0);
}

View File

@ -25,15 +25,15 @@
#include <gtkosxapplication.h>
#endif
#include "batchqueuepanel.h"
#include "editorpanel.h"
#include "editwindow.h"
#include "filepanel.h"
#include "progressconnector.h"
#include "splash.h"
#include "../rtengine/noncopyable.h"
class BatchQueueEntry;
class BatchQueuePanel;
class EditorPanel;
class FilePanel;
class RTWindow :
public Gtk::Window,
public rtengine::ProgressListener,
@ -55,10 +55,7 @@ private:
Gtk::Image *iFullscreen, *iFullscreen_exit;
bool isSingleTabMode()
{
return !options.tabbedUI && ! (options.multiDisplayMode > 0);
};
bool isSingleTabMode() const;
bool on_expose_event_epanel (GdkEventExpose* event);
bool on_expose_event_fpanel (GdkEventExpose* event);

View File

@ -20,6 +20,7 @@
#include "multilangmgr.h"
#include "options.h"
#include "rtscalable.h"
#include "thumbbrowserbase.h"
#include "../rtengine/rt_math.h"