wxPageSetupDialogData(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– wxPageSetupDialogData β€” the Erlang module definition, bestie edition πŸ’–

okay so, before we even start: this page is from the Erlang Module Definition part of the wx docs, and the whole vibe here is "this little class is holding all ur page-setup tea". Let's get into it 🫢

✨ NAME ✨

wxPageSetupDialogData β€” this class holds a variety of information related to wxPageSetupDialog.

Like, it's the lil handbag πŸ‘œ where all ur page-setup settings live. That's the whole job. Iconic.


πŸ¦‹ DESCRIPTION πŸ¦‹

So this class contains a wxPrintData member, and that member is the one holding ur basic printer configuration data β€” as opposed to the user-interface configuration settings, which are the ones stored by wxPageSetupDialogData itself. Two different girlies, two different jobs, no overlap πŸŽ€

See also, for ur reading pleasure:

  • Overview printing
  • wxPageSetupDialog

And yes, the wxWidgets docs page for wxPageSetupDialogData exists too, if u wanna go deeper. iykyk.


🌸 DATA TYPES 🌸

  • wxPageSetupDialogData() :: wx:wx_object().

That's it. That's the whole type. She's an object, periodt πŸ’…


πŸ‘‘ FUNCTIONS πŸ‘‘

destroy/1

destroy(This :: wxPageSetupDialogData()) -> ok.

Destroys the object. bye bestie πŸ˜­πŸ’€


enableHelp/2

enableHelp(This, Flag) -> ok
    when
        This :: wxPageSetupDialogData(),
        Flag :: boolean().

Enables or disables the "Help" button. Windows only, no cap.


enableMargins/2

enableMargins(This, Flag) -> ok
    when
        This :: wxPageSetupDialogData(),
        Flag :: boolean().

Enables or disables the margin controls. Windows only.


enableOrientation/2

enableOrientation(This, Flag) -> ok
    when
        This :: wxPageSetupDialogData(),
        Flag :: boolean().

Enables or disables the orientation control. Windows only.


enablePaper/2

enablePaper(This, Flag) -> ok
    when
        This :: wxPageSetupDialogData(),
        Flag :: boolean().

Enables or disables the paper size control. Windows only.


enablePrinter/2

enablePrinter(This, Flag) -> ok
    when
        This :: wxPageSetupDialogData(),
        Flag :: boolean().

Enables or disables the "Printer" button, which invokes a printer setup dialog. (No "Windows only" note here, so she's doing her thing everywhere ✨)


getDefaultInfo/1

getDefaultInfo(This) -> boolean()
    when This :: wxPageSetupDialogData().

Returns true if the dialog will simply return default printer information (such as orientation) instead of showing a dialog. Windows only.


getDefaultMinMargins/1

getDefaultMinMargins(This) -> boolean()
    when This :: wxPageSetupDialogData().

Returns true if the page setup dialog will take its minimum margin values from the currently selected printer properties. Windows only.


getEnableHelp/1

getEnableHelp(This) -> boolean()
    when This :: wxPageSetupDialogData().

Returns true if the printer setup button is enabled. πŸŽ€


getEnableMargins/1

getEnableMargins(This) -> boolean()
    when This :: wxPageSetupDialogData().

Returns true if the margin controls are enabled. Windows only.


getEnableOrientation/1

getEnableOrientation(This) -> boolean()
    when This :: wxPageSetupDialogData().

Returns true if the orientation control is enabled. Windows only.


getEnablePaper/1

getEnablePaper(This) -> boolean()
    when This :: wxPageSetupDialogData().

Returns true if the paper size control is enabled. Windows only.


getEnablePrinter/1

getEnablePrinter(This) -> boolean()
    when This :: wxPageSetupDialogData().

Returns true if the printer setup button is enabled.


getMarginBottomRight/1

getMarginBottomRight(This) -> {X :: integer(), Y :: integer()}
    when This :: wxPageSetupDialogData().

Returns the right (x) and bottom (y) margins, in millimetres. πŸ“


getMarginTopLeft/1

getMarginTopLeft(This) -> {X :: integer(), Y :: integer()}
    when This :: wxPageSetupDialogData().

Returns the left (x) and top (y) margins, in millimetres.


getMinMarginBottomRight/1

getMinMarginBottomRight(This) -> {X :: integer(), Y :: integer()}
    when This :: wxPageSetupDialogData().

Returns the right (x) and bottom (y) minimum margins the user can enter. Windows only.

Units are in millimetres.


getMinMarginTopLeft/1

getMinMarginTopLeft(This) -> {X :: integer(), Y :: integer()}
    when This :: wxPageSetupDialogData().

Returns the left (x) and top (y) minimum margins the user can enter. Windows only.

Units are in millimetres.


getPaperId/1

getPaperId(This) -> wx:wx_enum()
    when This :: wxPageSetupDialogData().

Returns the paper id β€” and note that it's stored in the internal wxPrintData object, not floating around loose.

See: wxPrintData:setPaperId/2


getPaperSize/1

getPaperSize(This) -> {W :: integer(), H :: integer()}
    when This :: wxPageSetupDialogData().

Returns the paper size, in millimetres.


getPrintData/1

getPrintData(This) -> wxPrintData:wxPrintData()
    when This :: wxPageSetupDialogData().

(No description in the original, bestie β€” she just hands u the print data, no commentary πŸ’…)


isOk/1

isOk(This) -> boolean()
    when This :: wxPageSetupDialogData().

Returns true if the print data associated with the dialog data is valid.

Heads up tho: this can return false on Windows if the current printer is not set, for example. On all other platforms, it returns true. 🫢


new/0

new() -> wxPageSetupDialogData().

Default constructor. Fresh out the box ✨


new/1

new(PrintData) -> wxPageSetupDialogData()
    when
        PrintData ::
            wxPrintData:wxPrintData() |
            wxPageSetupDialogData:wxPageSetupDialogData().

Construct an object from a print data object. πŸ‘‘


setDefaultInfo/2

setDefaultInfo(This, Flag) -> ok
    when
        This :: wxPageSetupDialogData(),
        Flag :: boolean().

Pass true if the dialog will simply return default printer information (such as orientation) instead of showing a dialog. Windows only.


setDefaultMinMargins/2

setDefaultMinMargins(This, Flag) -> ok
    when
        This :: wxPageSetupDialogData(),
        Flag :: boolean().

Pass true if the page setup dialog will take its minimum margin values from the currently selected printer properties. Windows only.

Units are in millimetres.


setMarginBottomRight/2

setMarginBottomRight(This, Pt) -> ok
    when
        This :: wxPageSetupDialogData(),
        Pt :: {X :: integer(), Y :: integer()}.

Sets the right (x) and bottom (y) margins, in millimetres.


setMarginTopLeft/2

setMarginTopLeft(This, Pt) -> ok
    when
        This :: wxPageSetupDialogData(),
        Pt :: {X :: integer(), Y :: integer()}.

Sets the left (x) and top (y) margins, in millimetres.


setMinMarginBottomRight/2

setMinMarginBottomRight(This, Pt) -> ok
    when
        This :: wxPageSetupDialogData(),
        Pt :: {X :: integer(), Y :: integer()}.

Sets the right (x) and bottom (y) minimum margins the user can enter. Windows only.

Units are in millimetres.


setMinMarginTopLeft/2

setMinMarginTopLeft(This, Pt) -> ok
    when
        This :: wxPageSetupDialogData(),
        Pt :: {X :: integer(), Y :: integer()}.

Sets the left (x) and top (y) minimum margins the user can enter. Windows only.

Units are in millimetres.


setPaperId/2

setPaperId(This, Id) -> ok
    when
        This :: wxPageSetupDialogData(),
        Id :: wx:wx_enum().

Sets the paper size id.

🚨 IMPORTANT, bestie: calling this function overrides the explicit paper dimensions passed in setPaperSize/2. So like, pick ur fighter. Don't come crying to me later 😭

See: wxPrintData:setPaperId/2


setPaperSize/2

setPaperSize(This, Size) -> ok
    when
        This :: wxPageSetupDialogData(),
        Size :: {W :: integer(), H :: integer()}.

Sets the paper size, in millimetres.

If a corresponding paper id is found, it will be set in the internal wxPrintData object, otherwise the paper size overrides the paper id. πŸŒ€


setPrintData/2

setPrintData(This, PrintData) -> ok
    when
        This :: wxPageSetupDialogData(),
        PrintData :: wxPrintData:wxPrintData().

Sets the print data associated with this object. πŸŽ€


🌈 the sign-off 🌈

K that's the whole page! This lil beauty comes to u from Ericsson AB, tagged wx 2.6, and the page itself is wxPageSetupDialogData(3). Slay, go forth and set ur paper size responsibly πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from