#include <ap_Dialog_FormatTable.h>
AP_Dialog_FormatTable::AP_Dialog_FormatTable | ( | XAP_DialogFactory * | pDlgFactory, | |
XAP_Dialog_Id | id | |||
) |
References m_dThickness, sThickness, and UT_convertToInches().
AP_Dialog_FormatTable::~AP_Dialog_FormatTable | ( | void | ) | [virtual] |
References DELETEP, m_pFormatTablePreview, m_pImage, and stopUpdater().
void AP_Dialog_FormatTable::_createPreviewFromGC | ( | GR_Graphics * | gc, | |
UT_uint32 | width, | |||
UT_uint32 | height | |||
) |
guint AP_Dialog_FormatTable::_findClosestThickness | ( | const char * | sthickness | ) | const [protected] |
References m_dThickness, and UT_convertToInches().
Referenced by AP_UnixDialog_FormatTable::setBorderThicknessInGUI(), and AP_CocoaDialog_FormatTable::setBorderThicknessInGUI.
bool AP_Dialog_FormatTable::_getToggleButtonStatus | ( | const char * | lineStyle | ) | const [private] |
References LS_OFF, m_vecProps, PP_getAttribute(), style, and UT_std_string_sprintf().
Referenced by getBottomToggled(), getLeftToggled(), getRightToggled(), and getTopToggled().
void AP_Dialog_FormatTable::applyChanges | ( | void | ) |
void AP_Dialog_FormatTable::askForGraphicPathName | ( | void | ) |
Import graphic for cell background.
References UT_String::c_str(), UT_String::clear(), GR_Graphics::createNewImage(), DELETEP, IE_ImpGraphic::enumerateDlgLabels(), FREEP, XAP_Dialog_FileOpenSaveAs::getAnswer(), XAP_Dialog::getApp(), XAP_Frame::getCurrentView(), XAP_Frame::getDialogFactory(), FV_View::getDocument(), XAP_Dialog_FileOpenSaveAs::getFileType(), AP_FormatTable_preview::getGraphics(), IE_ImpGraphic::getImporterCount(), XAP_App::getLastFocussedFrame(), XAP_Dialog_FileOpenSaveAs::getPathname(), PD_Document::getUID(), XAP_Preview::getWindowHeight(), XAP_Preview::getWindowWidth(), UT_UniqueId::Image, IE_ImpGraphic::loadGraphic(), m_iGraphicType, m_pFormatTablePreview, m_pGraphic, m_pImage, m_sImagePath, XAP_CustomWidget::queueDraw(), XAP_DialogFactory::releaseDialog(), XAP_DialogFactory::requestDialog(), XAP_Dialog_FileOpenSaveAs::runModal(), XAP_Dialog_FileOpenSaveAs::setCurrentPathname(), XAP_Dialog_FileOpenSaveAs::setFileTypeList(), XAP_Dialog_FileOpenSaveAs::setSuggestFilename(), ShowErrorBox(), UT_String::size(), type, UT_ASSERT_HARMLESS, UT_calloc(), UT_OK, UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, UT_String_sprintf(), XAP_DIALOG_FILEOPENSAVEAS_FILE_TYPE_AUTO, and XAP_DIALOG_ID_INSERT_PICTURE.
Referenced by AP_Win32Dialog_FormatTable::_onCommand(), and s_select_image().
void AP_Dialog_FormatTable::autoUpdateMC | ( | UT_Worker * | pTimer | ) | [static] |
Autoupdater of the dialog.
References UT_Worker::getInstanceData(), m_bAutoUpdate_happening_now, m_bDestroy_says_stopupdating, setAllSensitivities(), setCurCellProps(), and UT_return_if_fail.
Referenced by startUpdater().
void AP_Dialog_FormatTable::clearImage | ( | void | ) |
References UT_String::clear(), DELETEP, m_pFormatTablePreview, m_pGraphic, m_pImage, m_sImagePath, and XAP_CustomWidget::queueDraw().
Referenced by AP_Win32Dialog_FormatTable::_onCommand(), and s_remove_image().
void AP_Dialog_FormatTable::ConstructWindowName | ( | void | ) |
References XAP_Dialog_Modeless::BuildWindowName(), FREEP, gchar, XAP_Dialog::getApp(), XAP_App::getStringSet(), XAP_StringSet::getValue(), m_WindowName, and UT_XML_cloneNoAmpersands().
Referenced by AP_UnixDialog_FormatTable::_constructWindow(), AP_Win32Dialog_FormatTable::activate(), AP_UnixDialog_FormatTable::activate(), AP_CocoaDialog_FormatTable::activate, AP_Win32Dialog_FormatTable::notifyActiveFrame(), AP_UnixDialog_FormatTable::notifyActiveFrame(), and AP_CocoaDialog_FormatTable::notifyActiveFrame.
void AP_Dialog_FormatTable::event_update | ( | void | ) |
void AP_Dialog_FormatTable::finalize | ( | void | ) |
AP_Dialog_FormatTable::tAnswer AP_Dialog_FormatTable::getAnswer | ( | void | ) | const |
References m_answer.
bool AP_Dialog_FormatTable::getBottomToggled | ( | ) | const |
const FG_ConstGraphicPtr& AP_Dialog_FormatTable::getGraphic | ( | void | ) | const [inline] |
Referenced by AP_FormatTable_preview::draw().
GR_Image* AP_Dialog_FormatTable::getImage | ( | void | ) | const [inline] |
Referenced by AP_FormatTable_preview::draw().
bool AP_Dialog_FormatTable::getLeftToggled | ( | ) | const |
PP_PropertyVector& AP_Dialog_FormatTable::getPropVector | ( | ) | [inline] |
Referenced by AP_FormatTable_preview::draw().
const PP_PropertyVector& AP_Dialog_FormatTable::getPropVector | ( | ) | const [inline] |
bool AP_Dialog_FormatTable::getRightToggled | ( | ) | const |
bool AP_Dialog_FormatTable::getTopToggled | ( | ) | const |
virtual void AP_Dialog_FormatTable::runModeless | ( | XAP_Frame * | pFrame | ) | [pure virtual] |
Implements XAP_Dialog_Modeless.
Implemented in AP_CocoaDialog_FormatTable, and AP_UnixDialog_FormatTable.
Referenced by s_doFormatTableDlg().
void AP_Dialog_FormatTable::setActiveFrame | ( | XAP_Frame * | pFrame | ) | [virtual] |
Reimplemented from XAP_Dialog_Modeless.
References XAP_Dialog_Modeless::getActiveFrame(), and XAP_Dialog_Modeless::notifyActiveFrame().
void AP_Dialog_FormatTable::setAllSensitivities | ( | void | ) |
Sets the sensitivity of the radio buttons to top/bottom/left/right line buttons Call this right after contructing the widget and before dropping into the main loop.
References XAP_Dialog::getApp(), XAP_Frame::getCurrentView(), XAP_App::getLastFocussedFrame(), FV_View::getPoint(), FV_View::isInTable(), and setSensitivity().
Referenced by AP_Win32Dialog_FormatTable::_onInitDialog(), AP_UnixDialog_FormatTable::_populateWindowData(), AP_CocoaDialog_FormatTable::_populateWindowData, AP_Win32Dialog_FormatTable::activate(), AP_UnixDialog_FormatTable::activate(), AP_CocoaDialog_FormatTable::activate, autoUpdateMC(), AP_Win32Dialog_FormatTable::notifyActiveFrame(), AP_UnixDialog_FormatTable::notifyActiveFrame(), and AP_CocoaDialog_FormatTable::notifyActiveFrame.
void AP_Dialog_FormatTable::setApplyFormatTo | ( | FormatTable | applyTo | ) |
void AP_Dialog_FormatTable::setBackgroundColor | ( | const UT_RGBColor & | clr | ) |
References UT_String::c_str(), UT_RGBColor::isTransparent(), UT_RGBColor::m_blu, m_bSettingsChanged, UT_RGBColor::m_grn, UT_RGBColor::m_red, m_vecProps, PP_addOrSetAttribute(), PP_removeAttribute(), and UT_String_sprintf().
Referenced by AP_Win32Dialog_FormatTable::_onCommand(), and AP_UnixDialog_FormatTable__onBackgroundColorClicked().
virtual void AP_Dialog_FormatTable::setBackgroundColorInGUI | ( | UT_RGBColor | clr | ) | [pure virtual] |
Implemented in AP_CocoaDialog_FormatTable, and AP_UnixDialog_FormatTable.
Referenced by setCurCellProps().
void AP_Dialog_FormatTable::setBorderColor | ( | const UT_RGBColor & | clr | ) |
References UT_RGBColor::m_blu, m_borderColor, m_borderToggled, m_bSettingsChanged, UT_RGBColor::m_grn, UT_RGBColor::m_red, m_vecProps, m_vecPropsAdjBottom, m_vecPropsAdjRight, PP_addOrSetAttribute(), s, and UT_std_string_sprintf().
Referenced by AP_Win32Dialog_FormatTable::_onCommand(), and AP_UnixDialog_FormatTable__onBorderColorClicked().
void AP_Dialog_FormatTable::setBorderThickness | ( | const UT_UTF8String & | sThick | ) |
References m_borderToggled, m_bSettingsChanged, m_sBorderThickness, m_vecProps, PP_addOrSetAttribute(), and UT_UTF8String::utf8_str().
Referenced by AP_Win32Dialog_FormatTable::_onCommand(), AP_UnixDialog_FormatTable::event_BorderThicknessChanged(), and AP_CocoaDialog_FormatTable::event_BorderThicknessChanged.
virtual void AP_Dialog_FormatTable::setBorderThicknessInGUI | ( | UT_UTF8String & | sThick | ) | [pure virtual] |
Implemented in AP_CocoaDialog_FormatTable, and AP_UnixDialog_FormatTable.
void AP_Dialog_FormatTable::setCurCellProps | ( | void | ) |
References UT_String::c_str(), UT_String::clear(), FG_GraphicRaster::createFromStrux(), GR_Graphics::createNewImage(), DELETEP, FS_FILL, gchar, XAP_Dialog::getApp(), FV_View::getCellProperty(), fl_ContainerLayout::getContainerType(), FV_View::getCurrentBlock(), XAP_Frame::getCurrentView(), AP_FormatTable_preview::getGraphics(), XAP_App::getLastFocussedFrame(), FV_View::getPoint(), FV_View::getSelectionAnchor(), XAP_Preview::getWindowHeight(), XAP_Preview::getWindowWidth(), FV_View::isImageAtStrux(), FV_View::isInTable(), m_bSettingsChanged, m_iOldPos, m_pFormatTablePreview, m_pGraphic, m_pImage, m_sImagePath, m_vecProps, fl_ContainerLayout::myContainingLayout(), PP_addOrSetAttribute(), PP_removeAttribute(), PTX_SectionCell, XAP_CustomWidget::queueDraw(), setBackgroundColorInGUI(), UT_RGBColor::setColor(), UT_ASSERT_HARMLESS, UT_SHOULD_NOT_HAPPEN, and UT_std_string_sprintf().
Referenced by autoUpdateMC().
virtual void AP_Dialog_FormatTable::setSensitivity | ( | bool | bSens | ) | [pure virtual] |
Implemented in AP_CocoaDialog_FormatTable, and AP_UnixDialog_FormatTable.
Referenced by setAllSensitivities().
void AP_Dialog_FormatTable::startUpdater | ( | void | ) | [virtual] |
References autoUpdateMC(), m_bAutoUpdate_happening_now, m_bDestroy_says_stopupdating, m_pAutoUpdaterMC, UT_Timer::set(), UT_Timer::start(), and UT_Timer::static_constructor().
Referenced by AP_Win32Dialog_FormatTable::_onInitDialog(), AP_UnixDialog_FormatTable::runModeless(), and AP_CocoaDialog_FormatTable::runModeless.
void AP_Dialog_FormatTable::stopUpdater | ( | void | ) | [virtual] |
References DELETEP, m_bDestroy_says_stopupdating, m_pAutoUpdaterMC, and UT_Timer::stop().
Referenced by finalize(), and ~AP_Dialog_FormatTable().
void AP_Dialog_FormatTable::toggleLineType | ( | toggle_button | btn, | |
bool | enabled | |||
) |
Set the color and style and thickness of the toggled button
References LS_OFF, UT_RGBColor::m_blu, m_borderColor, m_borderToggled, m_bSettingsChanged, UT_RGBColor::m_grn, m_lineStyle, UT_RGBColor::m_red, m_sBorderThickness, m_vecProps, PP_addOrSetAttribute(), toggle_bottom, toggle_left, toggle_right, toggle_top, UT_std_string_sprintf(), and UT_UTF8String::utf8_str().
Referenced by AP_Win32Dialog_FormatTable::_onCommand(), s_line_bottom(), s_line_left(), s_line_right(), and s_line_top().
FormatTable AP_Dialog_FormatTable::m_ApplyTo [private] |
Referenced by applyChanges(), and setApplyFormatTo().
bool AP_Dialog_FormatTable::m_bAutoUpdate_happening_now [private] |
Referenced by autoUpdateMC(), and startUpdater().
bool AP_Dialog_FormatTable::m_bDestroy_says_stopupdating [private] |
Referenced by autoUpdateMC(), startUpdater(), and stopUpdater().
Referenced by setBorderColor(), and toggleLineType().
bool AP_Dialog_FormatTable::m_borderToggled [private] |
Referenced by setBorderColor(), setBorderThickness(), and toggleLineType().
bool AP_Dialog_FormatTable::m_bSettingsChanged [private] |
Referenced by applyChanges(), setBackgroundColor(), setBorderColor(), setBorderThickness(), setCurCellProps(), and toggleLineType().
double AP_Dialog_FormatTable::m_dThickness[FORMAT_TABLE_NUMTHICKNESS] [protected] |
Referenced by askForGraphicPathName().
Referenced by setCurCellProps().
Referenced by toggleLineType().
UT_Timer* AP_Dialog_FormatTable::m_pAutoUpdaterMC [private] |
Referenced by startUpdater(), and stopUpdater().
Referenced by _createPreviewFromGC(), AP_Win32Dialog_FormatTable::_onInitDialog(), askForGraphicPathName(), clearImage(), AP_Win32Dialog_FormatTable::event_previewExposed(), AP_UnixDialog_FormatTable::event_previewExposed(), AP_CocoaDialog_FormatTable::event_previewExposed, AP_UnixDialog_FormatTable::runModeless(), AP_CocoaDialog_FormatTable::runModeless, setCurCellProps(), and ~AP_Dialog_FormatTable().
Referenced by applyChanges(), askForGraphicPathName(), clearImage(), and setCurCellProps().
GR_Image* AP_Dialog_FormatTable::m_pImage [private] |
Referenced by askForGraphicPathName(), clearImage(), setCurCellProps(), and ~AP_Dialog_FormatTable().
Referenced by setBorderThickness(), and toggleLineType().
UT_String AP_Dialog_FormatTable::m_sImagePath [private] |
Referenced by applyChanges(), askForGraphicPathName(), clearImage(), and setCurCellProps().
Referenced by setBorderColor().
Referenced by setBorderColor().
char AP_Dialog_FormatTable::m_WindowName[100] [protected] |