bsnes/hiro/extension/table-layout.hpp
Tim Allen 4d7bb510f2 Update to bsnes v107.1 release.
byuu says:

Don't let the point release fool you, there are many significant changes in this
release. I will be keeping bsnes releases using a point system until the new
higan release is ready.

Changelog:

  - GUI: added high DPI support
  - GUI: fixed the state manager image preview
  - Windows: added a new waveOut driver with support for dynamic rate control
  - Windows: corrected the XAudio 2.1 dynamic rate control support [BearOso]
  - Windows: corrected the Direct3D 9.0 fullscreen exclusive window centering
  - Windows: fixed XInput controller support on Windows 10
  - SFC: added high-level emulation for the DSP1, DSP2, DSP4, ST010, and Cx4
    coprocessors
  - SFC: fixed a slight rendering glitch in the intro to Megalomania

If the coprocessor firmware is missing, bsnes will fallback on HLE where it is
supported, which is everything other than SD Gundam GX and the two Hayazashi
Nidan Morita Shougi games.

The Windows dynamic rate control works best with Direct3D in fullscreen
exclusive mode. I recommend the waveOut driver over the XAudio 2.1 driver, as it
is not possible to target a single XAudio2 version on all Windows OS releases.
The waveOut driver should work everywhere out of the box.

Note that with DRC, the synchronization source is your monitor, so you will
want to be running at 60hz (NTSC) or 50hz (PAL). If you have an adaptive sync
monitor, you should instead use the WASAPI (exclusive) or ASIO audio driver.
2019-04-09 11:16:30 +10:00

129 lines
3.6 KiB
C++

#if defined(Hiro_TableLayout)
struct TableLayout;
struct TableLayoutColumn;
struct TableLayoutRow;
struct TableLayoutCell;
struct mTableLayout;
struct mTableLayoutColumn;
struct mTableLayoutRow;
struct mTableLayoutCell;
using sTableLayout = shared_pointer<mTableLayout>;
using sTableLayoutColumn = shared_pointer<mTableLayoutColumn>;
using sTableLayoutRow = shared_pointer<mTableLayoutRow>;
using sTableLayoutCell = shared_pointer<mTableLayoutCell>;
struct mTableLayout : mSizable {
using type = mTableLayout;
using mSizable::remove;
auto alignment() const -> Alignment;
auto append(sSizable sizable, Size size) -> type&;
auto cell(uint position) const -> TableLayoutCell;
auto cell(uint x, uint y) const -> TableLayoutCell;
auto cell(sSizable sizable) const -> TableLayoutCell;
auto cells() const -> vector<TableLayoutCell>;
auto cellCount() const -> uint;
auto column(uint position) const -> TableLayoutColumn;
auto columns() const -> vector<TableLayoutColumn>;
auto columnCount() const -> uint;
auto minimumSize() const -> Size override;
auto padding() const -> Geometry;
auto remove(sSizable sizable) -> type&;
auto remove(sTableLayoutCell cell) -> type&;
auto reset() -> type& override;
auto resize() -> type&;
auto row(uint position) const -> TableLayoutRow;
auto rows() const -> vector<TableLayoutRow>;
auto rowCount() const -> uint;
auto setAlignment(Alignment alignment) -> type&;
auto setEnabled(bool enabled) -> type& override;
auto setFont(const Font& font) -> type& override;
auto setGeometry(Geometry geometry) -> type& override;
auto setPadding(Geometry padding) -> type&;
auto setParent(mObject* parent = nullptr, int offset = -1) -> type& override;
auto setSize(Size size) -> type&;
auto setVisible(bool visible) -> type& override;
auto size() const -> Size;
auto synchronize() -> type&;
private:
auto destruct() -> void override;
struct State {
Alignment alignment;
vector<TableLayoutCell> cells;
vector<TableLayoutColumn> columns;
Geometry padding;
vector<TableLayoutRow> rows;
Size size;
} state;
};
struct mTableLayoutColumn : mObject {
using type = mTableLayoutColumn;
auto alignment() const -> Alignment;
auto setAlignment(Alignment alignment) -> type&;
auto setSpacing(float spacing) -> type&;
auto spacing() const -> float;
auto synchronize() -> type&;
private:
struct State {
Alignment alignment;
float spacing = 5_sx;
} state;
friend class mTableLayout;
};
struct mTableLayoutRow : mObject {
using type = mTableLayoutRow;
auto alignment() const -> Alignment;
auto setAlignment(Alignment alignment) -> type&;
auto setSpacing(float spacing) -> type&;
auto spacing() const -> float;
auto synchronize() -> type&;
private:
struct State {
Alignment alignment;
float spacing = 5_sy;
} state;
friend class mTableLayout;
};
struct mTableLayoutCell : mObject {
using type = mTableLayoutCell;
auto alignment() const -> Alignment;
auto setAlignment(Alignment alignment) -> type&;
auto setEnabled(bool enabled) -> type& override;
auto setFont(const Font& font) -> type& override;
auto setParent(mObject* parent = nullptr, int offset = -1) -> type& override;
auto setSizable(sSizable sizable) -> type&;
auto setSize(Size size) -> type&;
auto setVisible(bool visible) -> type& override;
auto sizable() const -> Sizable;
auto size() const -> Size;
auto synchronize() -> type&;
private:
auto destruct() -> void override;
struct State {
Alignment alignment;
sSizable sizable;
Size size;
} state;
friend class mTableLayout;
};
#endif